| 26 | |
| 27 | @dataclass(frozen=True) |
| 28 | class ExecutionRegistry: |
| 29 | commands: tuple[MirroredCommand, ...] |
| 30 | tools: tuple[MirroredTool, ...] |
| 31 | |
| 32 | def command(self, name: str) -> MirroredCommand | None: |
| 33 | lowered = name.lower() |
| 34 | for command in self.commands: |
| 35 | if command.name.lower() == lowered: |
| 36 | return command |
| 37 | return None |
| 38 | |
| 39 | def tool(self, name: str) -> MirroredTool | None: |
| 40 | lowered = name.lower() |
| 41 | for tool in self.tools: |
| 42 | if tool.name.lower() == lowered: |
| 43 | return tool |
| 44 | return None |
| 45 | |
| 46 | |
| 47 | def build_execution_registry() -> ExecutionRegistry: |
no outgoing calls
no test coverage detected