Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4d03783
feat(coach): sign in with ChatGPT to use your ChatGPT plan instead of…
MouryB Oct 15, 2026
ec6035b
fix(coach): ChatGPT stream output, session races, and review findings
MouryB Oct 15, 2026
d482905
fix(coach): serialize ChatGPT session commits with sign-out; fail clo…
MouryB Oct 15, 2026
1dc294e
fix(coach): forget a parked rotated token on reset and on a new sign-in
MouryB Oct 15, 2026
2ad8eb8
fix(coach): a slow sign-out no longer deletes a newer sign-in
MouryB Oct 15, 2026
f71cef9
fix(coach): revoke on reset, keep a rotated token when the keychain w…
MouryB Oct 22, 2026
bac96d6
coach: verify the chatgpt id token signature against openai's jwks
abdulsaheel Oct 28, 2026
c9fb2c4
coach: a signed-out chatgpt coach no longer schedules briefings
abdulsaheel Oct 28, 2026
d588aef
coach: revoke chatgpt tokens from a sign-in that ends without a session
abdulsaheel Oct 28, 2026
b1dd5e9
coach: revoke a chatgpt refresh that lands after its session ended
abdulsaheel Oct 28, 2026
401aa88
coach: say chatgpt data controls may apply, and name plus and pro only
abdulsaheel Oct 28, 2026
81f0aec
coach: send function tools in a namespace on the chatgpt plan route
abdulsaheel Oct 28, 2026
3d17f00
coach: the chatgpt card shows cancel while its first sign-in is out
MouryB Oct 28, 2026
6a663d4
coach: a chatgpt sign-in can't land during a reset; terminal cleanup …
MouryB Oct 30, 2026
1ec7018
Merge branch 'main' into feat/sign-in-with-chatgpt
abdulsaheel Oct 31, 2026
2d2bddd
coach: drop a model list from the other provider, cancel sign-in on a…
abdulsaheel Oct 31, 2026
668eb69
coach: keep the sign-in-ended message when its cleanup fails
abdulsaheel Oct 31, 2026
62a86fe
Merge remote-tracking branch 'origin/main' into pr602-terms
abdulsaheel Nov 1, 2026
bd3f030
coach: point at openai's terms and usage policies before chatgpt sign-in
abdulsaheel Nov 1, 2026
885f527
coach: revoke the access token too on chatgpt sign-out and reset
abdulsaheel Nov 1, 2026
753f7df
coach: revoke the refresh and access tokens in parallel
abdulsaheel Nov 1, 2026
e27509f
coach: reset clears chatgpt mode and model; guide names both setup paths
abdulsaheel Nov 1, 2026
0fb01be
reset: say so when the chatgpt sign-in may have outlived it
abdulsaheel Nov 1, 2026
ef5ce93
reset: cover a session not loaded yet and an exchange still out
abdulsaheel Nov 1, 2026
3ae4eca
coach: close two sign-in windows a cancel or reset could slip through
abdulsaheel Nov 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ symbol names don't; verify against the source, not this doc.
A Flutter health app for wearables (WHOOP 4.0/5.0/MG supported today). **Fully on-device,
local-first**: BLE offload → SQLite → on-device analytics → UI. No backend owns
user data. Network use is limited to OTA update pointers, opt-in
telemetry/Crashlytics, and BYOK LLM calls.
telemetry/Crashlytics, and BYOK LLM calls (or the user's ChatGPT sign-in,
whose OAuth calls go to auth.openai.com).

Three sibling repos, strict separation — push work to the right one:
- `OpenStrap/protocol` — bytes: GATT, framing, CRC, opcodes, record decode.
Expand Down
6 changes: 5 additions & 1 deletion PRIVACY.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ configure:
- **AI Coach** — if you enable this feature and supply your own API key,
summaries of your data are sent to the AI provider you configure (by
default, OpenAI) to generate coaching responses. Off by default and
requires your own API key.
requires your own API key, or signing in with ChatGPT (Plus or Pro), in
which case the same data goes to OpenAI under your ChatGPT account and your
ChatGPT data controls, including model-training settings, may apply to it.
Check them in ChatGPT settings. The sign-in tokens are kept in the device
keychain/keystore and sent only to OpenAI.
- **Health app integration** — if you enable it, the App can write derived
daily metrics to Apple Health or Google Health Connect, which are controlled
by your device's own OS-level health app, not by us. The App can also *read*
Expand Down
6 changes: 6 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -344,5 +344,11 @@
</intent>
<!-- Health Connect app discovery (for install/status checks). -->
<package android:name="com.google.android.apps.healthdata" />
<!-- Lets url_launcher find a Custom Tabs browser for the "Sign in with
ChatGPT" page (LaunchMode.inAppBrowserView); without it Android 11+
falls back to a WebView. -->
<intent>
<action android:name="android.support.customtabs.action.CustomTabsService" />
</intent>
</queries>
</manifest>
40 changes: 36 additions & 4 deletions guides/AI_COACH.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# AI Coach — bring your own key
# AI Coach — your own model, or your ChatGPT plan

The AI features in OpenStrap Edge (the Coach chat, the morning and evening
briefings, and the pre-sleep journal) are all powered by a model **you**
provide. There's no OpenStrap AI service: you paste in an API key for any
OpenAI-compatible provider and the app talks to that provider directly.
provide. There's no OpenStrap AI service. There are two ways to set it up:
paste in an API key for any OpenAI-compatible provider, or
[sign in with your ChatGPT plan](#use-your-chatgpt-plan). Either way the app
talks to that provider directly.

Your key is stored in the device keychain/keystore and is only ever sent to
the base URL you configure — never to OpenStrap.
Expand All @@ -14,7 +16,37 @@ the provider you configure. Before enabling the feature, check that
provider's data retention and training policies — or point the app at a
model you host yourself.

## Setup
## Use your ChatGPT plan

If you pay for ChatGPT Plus or Pro, you can skip the API key: open
**AI Coach → settings**, tap **ChatGPT** and sign in. Eligible coach, briefing and journal requests then use
the usage included in your ChatGPT plan instead of API billing. Tap **List
models** and pick one, then **Save**.

Before the sign-in starts, the app links OpenAI's
[Terms of Use](https://openai.com/policies/terms-of-use/) and
[Usage Policies](https://openai.com/policies/usage-policies/). They apply to
your use of ChatGPT here, so read them before you continue.

- This uses OpenAI's official
[Sign in with ChatGPT](https://developers.openai.com/siwc/token-sharing-open-source)
for open-source apps. OpenStrap never sees your password, and never charges
for it.
- Set a limit, or disconnect OpenStrap, under
[ChatGPT settings → Usage](https://chatgpt.com/settings/usage). The
**Manage usage** button in AI settings goes there.
- When the limit is reached the coach says so and stops; it never quietly
switches to an API key.
- Your questions and the rows the coach reads go to OpenAI under your ChatGPT
account. Your ChatGPT data controls, including whether your content may be
used to train models, may apply to these requests, and they are not the same
terms as an OpenAI API key. Check them in ChatGPT settings before using this.
- **Sign out of ChatGPT** asks OpenAI to revoke the sign-in and clears it from
the phone. If the app says revocation wasn't confirmed, also disconnect
OpenStrap in ChatGPT settings. The coach then stays off until you sign in
again or pick another provider.

## Setup with an API key

<img src="images/ai-coach/settings.png" width="300" align="right">

Expand Down
Loading
Loading