Files
AutoMetabuilder/backend/autometabuilder/tool_map_builder.py
johndoe6345789 877ba64de8 Introduce AutoMetabuilder core components and workflow packages:
- Implement core components: CLI argument parsing, environment loading, GitHub service creation, and logging configuration.
- Add support for OpenAI client setup and model resolution.
- Develop SDLC context loader from GitHub and repository files.
- Implement workflow context and engine builders.
- Introduce major workflow packages: `game_tick_loop` and `contextual_iterative_loop`.
- Update localization files with new package descriptions and labels.
- Streamline web navigation by loading items from a dedicated JSON file.
2026-01-10 00:45:46 +00:00

23 lines
740 B
Python

"""Build tool map from registry entries."""
from .callable_loader import load_callable
def build_tool_map(gh, registry_entries: list) -> dict:
"""Build tool name to callable map."""
tool_map = {}
for entry in registry_entries:
name = entry.get("name")
provider = entry.get("provider")
if not name:
continue
if provider == "github":
method = entry.get("method")
tool_map[name] = getattr(gh, method) if gh and method else None
continue
if provider == "module":
path = entry.get("callable")
tool_map[name] = load_callable(path) if path else None
continue
tool_map[name] = None
return tool_map