*/ public function list(string $tenantId): array { $tenant = $this->tenants->fetch($tenantId); if ($tenant === null) { throw new SystemStoreException("Tenant '{$tenantId}' was not found"); } return $tenant->getConfiguration()->stores()->all(); } public function set( string $tenantId, string $name, string $provider, string|int $service, string $namespace, ): StoreReference { self::validateName($name); $reference = new StoreReference($provider, $service, $namespace); if (!$this->tenants->storeConfigurationStore($tenantId, $name, $reference->toArray())) { throw new SystemStoreException("Tenant '{$tenantId}' was not found"); } return $reference; } public function remove(string $tenantId, string $name): bool { self::validateName($name); $removed = $this->tenants->removeConfigurationStore($tenantId, $name); if ($removed === null) { throw new SystemStoreException("Tenant '{$tenantId}' was not found"); } return $removed; } private static function validateName(string $name): void { if (preg_match('/^[a-z][a-z0-9-]*$/', $name) !== 1) { throw new \InvalidArgumentException('Logical store names must use lowercase letters, numbers, and hyphens'); } } }