Why this design exists
Without a shared tool layer, one operation can turn into three separate implementations:- A CLI command for terminal users
- An agent tool for LLM-driven actions
- An HTTP endpoint for the web UI and external clients
Architecture overview
The Tool is the unit of functionality. CLI commands and the AI agent can call tools in process. HTTP callers go through the Tool Registry, which gives the server one dispatch point for browser and API requests.Responsibilities
Tool Registry boundary
The Tool Registry is the server-side entry point for callers that cannot import the Python tools directly. It keeps one registered instance of each tool and dispatches requests by name. This matters because it gives Hiro League a single place to add cross-cutting behavior for HTTP and future remote callers:- Source-based restrictions
- Role-based access
- Destructive operation confirmation
- Rate limiting
- Audit logging
