* Check if user is authenticated with first-party OAuth. * Required for settings sync in both CLI (upload) and CCR (download) modes. * * Only checks user:inference (not user:profile) — CCR's file-descriptor token * hardcodes scopes to ['user:inference'] only, so requiring profile would make * d
()
| 209 | * download a no-op there. Upload is independently guarded by getIsInteractive(). |
| 210 | */ |
| 211 | function isUsingOAuth(): boolean { |
| 212 | if (getAPIProvider() !== 'firstParty' || !isFirstPartyNoumenaBaseUrl()) { |
| 213 | return false |
| 214 | } |
| 215 | |
| 216 | return hasUsableSettingsSyncSession(getCurrentSettingsSyncSession()) |
| 217 | } |
| 218 | |
| 219 | function getSettingsSyncEndpoint(): string { |
| 220 | return `${getNoumenaPlatformBaseUrl()}/api/claude_code/user_settings` |
no test coverage detected