Files
zeekay 86c2cdcc0d feat: add new tool packages and install command
- Add hanzo-tools-code: code analysis and transformation tools
- Add hanzo-tools-net: network and HTTP tools
- Add hanzo-tools-plan: planning and task management tools
- Add hanzo-tools-test: testing tools
- Add hanzo-tools-vcs: version control tools
- Add install command for dependency management
- Improve CDP bridge server with better error handling
- Add ui_tool for computer tools
- Add unified tool loading and id_tool
- Add HIP documentation (HIP-0300, HIP-0301)
2026-01-24 13:21:16 -08:00

55 lines
1.2 KiB
Python

"""Test and validation tools for Hanzo AI (HIP-0300).
Tools:
- test: Unified test/validation tool (HIP-0300)
- run: Execute test/lint/typecheck
- detect: Auto-detect available tools
Kinds: test | lint | typecheck
Effect lattice position: NONDETERMINISTIC_EFFECT
Wraps process execution with structured Report output.
Install:
pip install hanzo-tools-test
Usage:
from hanzo_tools.test import register_tools, TOOLS
# Register with MCP server
register_tools(mcp_server)
# Or access the unified tool
from hanzo_tools.test import TestTool
"""
from hanzo_tools.core import BaseTool, ToolRegistry
from .test_tool import TestTool, test_tool
# Export list for tool discovery - HIP-0300 unified tool
TOOLS = [TestTool]
__all__ = [
"TestTool",
"test_tool",
"register_tools",
"TOOLS",
]
def register_tools(mcp_server, **kwargs) -> list[BaseTool]:
"""Register test tools with the MCP server.
Args:
mcp_server: The FastMCP server instance
**kwargs: Additional options (cwd, etc.)
Returns:
List of registered tool instances
"""
cwd = kwargs.get("cwd")
tool = TestTool(cwd=cwd)
ToolRegistry.register_tool(mcp_server, tool)
return [tool]