*/ public function discoverSystemInstalledAgents(): array { $platform = Platform::current(); return $this->getAgents() ->filter(fn (Agent $program): bool => $program->detectOnSystem($platform)) ->map(fn (Agent $program): string => $program->name()) ->values() ->toArray(); } /** * Detect agents used in the current project. * * @return array */ public function discoverProjectInstalledAgents(string $basePath): array { return $this->getAgents() ->filter(fn (Agent $program): bool => $program->detectInProject($basePath)) ->map(fn (Agent $program): string => $program->name()) ->values() ->toArray(); } /** * Get all registered agents. * * @return Collection */ public function getAgents(): Collection { return collect($this->boostManager->getAgents()) ->map(fn (string $className) => $this->container->make($className)); } }