Registry
provide.foundation.tools.registry
¶
TODO: Add module docstring.
Classes¶
ToolRegistry
¶
Wrapper around the hub registry for tool management.
Uses the main hub registry with dimension="tool_manager" to avoid namespace pollution while leveraging existing registry infrastructure.
Initialize the tool registry.
Source code in provide/foundation/tools/registry.py
Functions¶
create_tool_manager
¶
Create a tool manager instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Tool name or alias. |
required |
config
|
BaseConfig
|
Configuration object. |
required |
Returns:
| Type | Description |
|---|---|
BaseToolManager | None
|
Tool manager instance, or None if not found. |
Source code in provide/foundation/tools/registry.py
get_tool_info
¶
Get information about a specific tool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Tool name or alias. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any] | None
|
Tool metadata dictionary, or None if not found. |
Source code in provide/foundation/tools/registry.py
get_tool_manager_class
¶
Get a tool manager class by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Tool name or alias. |
required |
Returns:
| Type | Description |
|---|---|
type[BaseToolManager] | None
|
Tool manager class, or None if not found. |
Source code in provide/foundation/tools/registry.py
is_tool_registered
¶
list_tools
¶
List all registered tools.
Returns:
| Type | Description |
|---|---|
list[tuple[str, dict[str, Any]]]
|
List of (name, metadata) tuples. |
Source code in provide/foundation/tools/registry.py
register_tool_manager
¶
register_tool_manager(
name: str,
manager_class: type[BaseToolManager],
aliases: list[str] | None = None,
) -> None
Register a tool manager with the hub.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Tool name (e.g., "terraform"). |
required |
manager_class
|
type[BaseToolManager]
|
Tool manager class. |
required |
aliases
|
list[str] | None
|
Optional aliases for the tool. |
None
|
Source code in provide/foundation/tools/registry.py
Functions¶
get_tool_manager
¶
Get a tool manager instance from the global registry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Tool name or alias. |
required |
config
|
BaseConfig
|
Configuration object. |
required |
Returns:
| Type | Description |
|---|---|
BaseToolManager | None
|
Tool manager instance, or None if not found. |
Source code in provide/foundation/tools/registry.py
get_tool_registry
¶
Get the global tool registry instance.
Returns:
| Type | Description |
|---|---|
ToolRegistry
|
Tool registry instance. |
Source code in provide/foundation/tools/registry.py
register_tool_manager
¶
register_tool_manager(
name: str,
manager_class: type[BaseToolManager],
aliases: list[str] | None = None,
) -> None
Register a tool manager with the global registry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Tool name. |
required |
manager_class
|
type[BaseToolManager]
|
Tool manager class. |
required |
aliases
|
list[str] | None
|
Optional aliases. |
None
|