refactor: rename hanzo-metastable-consensus to hanzo-consensus

Simplified package naming for clarity.
This commit is contained in:
2025-12-26 16:42:52 -08:00
parent 935e6a253f
commit b2788b5fba
8 changed files with 21 additions and 12 deletions
@@ -1,22 +1,21 @@
# hanzo-metastable-consensus
# hanzo-consensus
Metastable consensus protocol for multi-agent agreement.
## Install
```bash
pip install hanzo-metastable-consensus
pip install hanzo-consensus
```
## Usage
```python
import asyncio
from hanzo_metastable_consensus import Consensus, Result, run
from hanzo_consensus import Consensus, Result, run
async def execute(participant: str, prompt: str) -> Result:
"""Your execution function."""
# Call your agent/model/service
output = await call_agent(participant, prompt)
return Result(id=participant, output=output, ok=True, ms=100)
@@ -1,5 +1,5 @@
[project]
name = "hanzo-metastable-consensus"
name = "hanzo-consensus"
version = "0.1.0"
description = "Metastable consensus protocol for multi-agent agreement"
readme = "README.md"
@@ -26,4 +26,4 @@ requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["hanzo_metastable_consensus"]
packages = ["hanzo_consensus"]
@@ -17,9 +17,18 @@ from mcp.server import FastMCP
from mcp.server.fastmcp import Context as MCPContext
from hanzo_tools.core import BaseTool, auto_timeout, create_tool_context
from hanzo_metastable_consensus import Consensus as MetastableConsensus
from hanzo_metastable_consensus import Result as ConsensusResult
from hanzo_metastable_consensus import run as run_consensus
# Optional consensus import - fallback to local implementation
try:
from hanzo_consensus import Consensus as MetastableConsensus
from hanzo_consensus import Result as ConsensusResult
from hanzo_consensus import run as run_consensus
HAS_CONSENSUS = True
except ImportError:
HAS_CONSENSUS = False
MetastableConsensus = None
ConsensusResult = None
run_consensus = None
Action = Annotated[
+2 -1
View File
@@ -18,16 +18,17 @@ classifiers = [
keywords = ["hanzo", "tools", "agent", "swarm", "mcp", "ai"]
dependencies = [
"hanzo-tools-core>=0.1.0",
"hanzo-metastable-consensus>=0.1.0",
"mcp>=1.25.0",
"fastmcp>=2.14.1",
"pydantic>=2.12.5",
]
[project.optional-dependencies]
consensus = ["hanzo-consensus>=0.1.0"]
full = [
"openai>=1.0.0",
"anthropic>=0.40.0",
"hanzo-consensus>=0.1.0",
]
dev = ["pytest>=7.0.0", "ruff>=0.14.0"]
@@ -7,7 +7,7 @@ from pydantic import Field
from mcp.server.fastmcp import Context as MCPContext
from hanzo_tools.core import BaseTool, auto_timeout, create_tool_context
from hanzo_metastable_consensus import run as run_consensus, Result as ConsensusResult
from hanzo_consensus import run as run_consensus, Result as ConsensusResult
from .llm_unified import LLMTool
+1 -1
View File
@@ -12,7 +12,7 @@ authors = [{ name = "Hanzo Industries Inc", email = "[email protected]" }]
keywords = ["hanzo", "tools", "llm", "mcp", "ai"]
dependencies = [
"hanzo-tools-core>=0.1.0",
"hanzo-metastable-consensus>=0.1.0",
"hanzo-consensus>=0.1.0",
"mcp>=1.25.0",
"fastmcp>=2.14.1",
"pydantic>=2.12.5",