detectAll static method

Future<List<Agent>> detectAll({
  1. required String basePath,
})

Detect all agents (both system and project)

Implementation

static Future<List<Agent>> detectAll({required String basePath}) async {
  final systemAgents = await detect();
  final projectAgents = await detectInProject(basePath);

  // Combine and deduplicate
  final allAgents = <Agent>{};
  for (final agent in [...systemAgents, ...projectAgents]) {
    allAgents.add(agent);
  }

  return allAgents.toList();
}