MCPcopy Create free account
hub / github.com/github/gh-aw / NewEngineCatalog

Function NewEngineCatalog

pkg/workflow/engine_definition.go:182–194  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
182func 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.
197func (c *EngineCatalog) Register(def *EngineDefinition) {

Calls 3

RegisterMethod · 0.95
PrintfMethod · 0.45