mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
- Add truncate_response with 25k token limit to directory_tree tool - Add token limiting to read, grep, find filesystem tools - Add token limiting to shell command output tools - Fix test import errors and syntax issues - Install hanzo-memory dependency for memory tests - Reduce pytest collection errors from 45 to 7 All tools now properly gate their responses to prevent exceeding the MCP token limit.
2.4 KiB
2.4 KiB
Python SDK Test Results
Summary
After reorganizing the directory structure and removing duplicates, here's the current state of the Python SDK packages:
Packages Tested
1. hanzo-mcp ✅
- Status: Mostly working
- Issues Fixed:
- Fixed import error: Changed
from hanzo_mcp.tools.filesystem.symbolstofrom hanzo_mcp.tools.filesystem.symbols_tool
- Fixed import error: Changed
- Current State: Basic imports work, CLI help works, but some tests need updating
2. hanzo-network ✅
- Status: No tests found (needs test suite)
- Installation: Successful
- Dependencies: Properly configured
3. hanzo-cli ✅
- Status: Installed successfully
- CLI: Basic functionality appears to work
4. hanzo-agents ⚠️
- Status: Needs dependency installation
- Issue: Missing structlog dependency during test (though it's listed in pyproject.toml)
- Fix: Run
pip install -e ./hanzo-agentsto install all dependencies
5. hanzo-memory 🔄
- Status: Not tested yet
Actions Taken
-
Removed Duplicates:
- Deleted
./hanzo-mcp/hanzo_network/(duplicate of./hanzo-network/) - Deleted
./hanzo-mcp/pkg/(contained duplicate hanzo-cli)
- Deleted
-
Fixed Import Issues:
- Updated import in
search_tool.pyto use correct module name
- Updated import in
-
Package Structure:
- All packages now have consistent structure
- No more duplicate code
- Clear separation between packages
Recommendations
-
For Go Consensus Project:
cd /path/to/consensus # Fix the import in chains/atomic/shared_memory.go:7:2 # The import github.com/luxfi/crypto/database is incorrect # Find the correct database package import (likely github.com/luxfi/consensus/database or similar) go mod tidy make test -
For Python SDK:
- Add comprehensive test suites to hanzo-network
- Ensure all packages are installed with their dependencies before testing
- Consider creating a top-level Makefile to test all packages
Build Commands
To ensure all packages build and test properly:
# Install all packages in development mode
pip install -e ./hanzo-mcp
pip install -e ./hanzo-network
pip install -e ./hanzo-cli
pip install -e ./hanzo-agents
pip install -e ./hanzo-memory
# Run tests (where available)
cd hanzo-mcp && python -m pytest
cd ../hanzo-agents && python -m pytest
cd ../hanzo-memory && python -m pytest