NewEngineCatalog creates an EngineCatalog that wraps the given EngineRegistry and pre-registers the built-in engine definitions (claude, codex, copilot, gemini, opencode, crush) loaded from the embedded Markdown files in data/engines/*.md.
(registry *EngineRegistry)
| 180 | // pre-registers the built-in engine definitions (claude, codex, copilot, gemini, opencode, crush) |
| 181 | // loaded from the embedded Markdown files in data/engines/*.md. |
| 182 | func NewEngineCatalog(registry *EngineRegistry) *EngineCatalog { |
| 183 | catalog := &EngineCatalog{ |
| 184 | definitions: make(map[string]*EngineDefinition), |
| 185 | registry: registry, |
| 186 | } |
| 187 | |
| 188 | for _, def := range loadBuiltinEngineDefinitions() { |
| 189 | catalog.Register(def) |
| 190 | } |
| 191 | |
| 192 | engineCatalogLog.Printf("Engine catalog initialized with %d built-in definitions", len(catalog.definitions)) |
| 193 | return catalog |
| 194 | } |
| 195 | |
| 196 | // Register adds or replaces an EngineDefinition in the catalog. |
| 197 | func (c *EngineCatalog) Register(def *EngineDefinition) { |