computeAllAgentManifestFiles computes the manifest files list from the registered engines. Called once during NewEngineRegistry to populate cachedManifestFiles.
()
| 626 | // computeAllAgentManifestFiles computes the manifest files list from the registered engines. |
| 627 | // Called once during NewEngineRegistry to populate cachedManifestFiles. |
| 628 | func (r *EngineRegistry) computeAllAgentManifestFiles() []string { |
| 629 | seen := map[string]struct { |
| 630 | }{} |
| 631 | var result []string |
| 632 | for _, engine := range r.engines { |
| 633 | provider, ok := engine.(AgentFileProvider) |
| 634 | if !ok { |
| 635 | continue |
| 636 | } |
| 637 | for _, file := range provider.GetAgentManifestFiles() { |
| 638 | if !setutil.Contains(seen, file) { |
| 639 | seen[file] = struct { |
| 640 | }{} |
| 641 | result = append(result, file) |
| 642 | } |
| 643 | } |
| 644 | } |
| 645 | sort.Strings(result) |
| 646 | return result |
| 647 | } |
| 648 | |
| 649 | // GetEngineByPrefix returns an engine that matches the given prefix |
| 650 | // This is useful for backward compatibility with strings like "codex-experimental" |
no test coverage detected