Currently repository settings are defined as Client's "foreignRepositories" setting. Loaded in Client particular settings are passed to several relevant classes (ie. DispatchingServiceFactory, RepositoryServiceContainerFactory) as different kinds of arrays. When Client enabled Repo also accesses Client's "foreignRepositories" setting to read information on entity types defined per repository.
In order for both classes requiring repository-config-related information and both Repo have a consistent way of accessing information defined in Client setting, RepositoryDefinitions object (similar to EntityTypeDefinitions and DataTypeDefinitions) should be introduced. The object will be populated with settings from the "foreignRepositories" settings and will be providing information required by Repo and relevant service factories (ie. it would have methods like getRepositoryDatabases returning mapping from repository names to database names, etc).
Also, having this kind of abstraction would make transition easier if we wanted to change the way how repositories are defined (e.g. move it out of Client settings).