Metadata-Version: 2.4
Name: hanzo-tools-core
Version: 0.3.0
Summary: DEPRECATED: Use hanzo-tools instead. This package re-exports from hanzo-tools for backwards compatibility.
Author-email: Hanzo Industries Inc <dev@hanzo.ai>
License: MIT
Project-URL: Homepage, https://github.com/hanzoai/python-sdk
Project-URL: Bug Tracker, https://github.com/hanzoai/python-sdk/issues
Keywords: hanzo,tools,mcp,ai
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: hanzo-tools>=0.3.0

# hanzo-tools-core

Core infrastructure for Hanzo MCP tools.

## Installation

```bash
pip install hanzo-tools-core
```

## Components

### BaseTool
Base class for all Hanzo tools.

```python
from hanzo_tools.core import BaseTool

class MyTool(BaseTool):
    name = "my_tool"
    
    @property
    def description(self) -> str:
        return "My custom tool"
    
    async def call(self, ctx, **params) -> str:
        return "result"
```

### ToolRegistry
Manage tool registration and discovery.

```python
from hanzo_tools.core import ToolRegistry

ToolRegistry.register_tools(mcp_server, [MyTool()])
```

### PermissionManager
Access control for file and command operations.

```python
from hanzo_tools.core import PermissionManager

pm = PermissionManager(allowed_paths=["/home/user/project"])
if pm.can_access("/home/user/project/file.py"):
    # proceed
```

### Decorators

```python
from hanzo_tools.core import auto_timeout

@auto_timeout("my_tool")
async def my_function():
    # Auto-backgrounds after timeout
    pass
```

## License

MIT
