( tokens: OAuthTokens, mode: OAuthInstallMode, )
| 49 | const STUB_ORGANIZATION_UUID = '00000000-0000-4000-8000-000000000002' |
| 50 | |
| 51 | function usesManagedInstallMode( |
| 52 | tokens: OAuthTokens, |
| 53 | mode: OAuthInstallMode, |
| 54 | ): boolean { |
| 55 | switch (mode) { |
| 56 | case 'managed': |
| 57 | return true |
| 58 | case 'console': |
| 59 | return false |
| 60 | case 'auto': |
| 61 | default: |
| 62 | return shouldUseClaudeAIAuth(tokens.scopes) |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | function isPresentIdentityValue(value: string | null | undefined): value is string { |
| 67 | return typeof value === 'string' && value.trim().length > 0 |
no test coverage detected