mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
- Add hanzo-tools-computer package for pyautogui Mac automation - Fix hanzo-tools-agent imports to use new package structure - Add get_read_only_*_tools() helpers to filesystem/jupyter - Remove BatchTool (replaced by dag - one tool per capability) - Remove hanzo-persona dependency (not published yet) - Simplify pyproject.toml for local development Packages ready for PyPI: - hanzo-tools-core - hanzo-tools-filesystem - hanzo-tools-shell - hanzo-tools-browser - hanzo-tools-memory - hanzo-tools-todo - hanzo-tools-reasoning - hanzo-tools-lsp - hanzo-tools-refactor - hanzo-tools-database - hanzo-tools-agent - hanzo-tools-jupyter - hanzo-tools-editor - hanzo-tools-computer (NEW)
44 lines
1.3 KiB
Python
44 lines
1.3 KiB
Python
"""Simple memory test to verify functionality."""
|
|
|
|
import pytest
|
|
|
|
|
|
def test_memory_registration():
|
|
"""Test that memory tools can be registered."""
|
|
from mcp.server.fastmcp import FastMCP
|
|
from hanzo_mcp.tools.common.permissions import PermissionManager
|
|
|
|
# Skip if memory not available
|
|
try:
|
|
from hanzo_tools.memory import register_memory_tools
|
|
except ImportError:
|
|
pytest.skip("hanzo-memory not available")
|
|
|
|
mcp_server = FastMCP("test-server")
|
|
permission_manager = PermissionManager()
|
|
permission_manager.add_allowed_path("/tmp")
|
|
|
|
tools = register_memory_tools(mcp_server, permission_manager, user_id="test_user", project_id="test_project")
|
|
|
|
assert len(tools) == 9
|
|
print(f"Successfully registered {len(tools)} memory tools")
|
|
|
|
|
|
def test_memory_descriptions():
|
|
"""Test memory tool descriptions."""
|
|
try:
|
|
from hanzo_tools.memory.memory_tools import CreateMemoriesTool
|
|
except ImportError:
|
|
pytest.skip("hanzo-memory not available")
|
|
|
|
tool = CreateMemoriesTool()
|
|
assert "save" in tool.description.lower()
|
|
assert "memory" in tool.description.lower()
|
|
print(f"CreateMemoriesTool description OK: {tool.description[:50]}...")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
test_memory_registration()
|
|
test_memory_descriptions()
|
|
print("\nAll simple tests passed!")
|