hanzo 0.2.6__tar.gz → 0.2.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of hanzo might be problematic. Click here for more details.
- {hanzo-0.2.6 → hanzo-0.2.8}/PKG-INFO +2 -1
- {hanzo-0.2.6 → hanzo-0.2.8}/pyproject.toml +2 -1
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/__init__.py +1 -1
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/cli.py +20 -14
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/utils/net_check.py +9 -7
- {hanzo-0.2.6 → hanzo-0.2.8}/.gitignore +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/README.md +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/__main__.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/commands/__init__.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/commands/agent.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/commands/auth.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/commands/chat.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/commands/cluster.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/commands/config.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/commands/mcp.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/commands/miner.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/commands/network.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/commands/repl.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/commands/tools.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/interactive/__init__.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/interactive/dashboard.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/interactive/repl.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/mcp_server.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/repl.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/router/__init__.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/utils/__init__.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/utils/config.py +0 -0
- {hanzo-0.2.6 → hanzo-0.2.8}/src/hanzo/utils/output.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hanzo
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.8
|
|
4
4
|
Summary: Hanzo AI - Complete AI Infrastructure Platform with CLI, Router, MCP, and Agent Runtime
|
|
5
5
|
Project-URL: Homepage, https://hanzo.ai
|
|
6
6
|
Project-URL: Repository, https://github.com/hanzoai/python-sdk
|
|
@@ -23,6 +23,7 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
|
23
23
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
24
|
Requires-Python: >=3.8
|
|
25
25
|
Requires-Dist: click>=8.1.0
|
|
26
|
+
Requires-Dist: hanzo-net>=0.1.0
|
|
26
27
|
Requires-Dist: httpx>=0.23.0
|
|
27
28
|
Requires-Dist: prompt-toolkit>=3.0.0
|
|
28
29
|
Requires-Dist: pydantic>=2.0.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "hanzo"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.8"
|
|
4
4
|
description = "Hanzo AI - Complete AI Infrastructure Platform with CLI, Router, MCP, and Agent Runtime"
|
|
5
5
|
authors = [
|
|
6
6
|
{name = "Hanzo AI", email = "dev@hanzo.ai"},
|
|
@@ -13,6 +13,7 @@ dependencies = [
|
|
|
13
13
|
"httpx>=0.23.0",
|
|
14
14
|
"pydantic>=2.0.0",
|
|
15
15
|
"pyyaml>=6.0",
|
|
16
|
+
"hanzo-net>=0.1.0",
|
|
16
17
|
]
|
|
17
18
|
readme = "README.md"
|
|
18
19
|
requires-python = ">= 3.8"
|
|
@@ -12,7 +12,7 @@ from .interactive.repl import HanzoREPL
|
|
|
12
12
|
from .utils.output import console
|
|
13
13
|
|
|
14
14
|
# Version
|
|
15
|
-
__version__ = "0.2.
|
|
15
|
+
__version__ = "0.2.8"
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
@click.group(invoke_without_command=True)
|
|
@@ -88,6 +88,18 @@ def serve(ctx, name: str, port: int):
|
|
|
88
88
|
asyncio.run(cluster.start_cluster(ctx, name, port))
|
|
89
89
|
|
|
90
90
|
|
|
91
|
+
@cli.command()
|
|
92
|
+
@click.option("--name", "-n", help="Node name (auto-generated if not provided)")
|
|
93
|
+
@click.option("--port", "-p", default=52415, help="Node port (default: 52415 for hanzo/net)")
|
|
94
|
+
@click.option("--network", default="local", help="Network to join (mainnet/testnet/local)")
|
|
95
|
+
@click.option("--models", "-m", multiple=True, help="Models to serve (e.g., llama-3.2-3b)")
|
|
96
|
+
@click.option("--max-jobs", type=int, default=10, help="Max concurrent jobs")
|
|
97
|
+
@click.pass_context
|
|
98
|
+
def net(ctx, name: str, port: int, network: str, models: tuple, max_jobs: int):
|
|
99
|
+
"""Start the Hanzo Network distributed AI compute node."""
|
|
100
|
+
asyncio.run(start_compute_node(ctx, name, port, network, models, max_jobs))
|
|
101
|
+
|
|
102
|
+
|
|
91
103
|
@cli.command()
|
|
92
104
|
@click.option("--name", "-n", help="Node name (auto-generated if not provided)")
|
|
93
105
|
@click.option("--port", "-p", default=52415, help="Node port (default: 52415 for hanzo/net)")
|
|
@@ -96,7 +108,7 @@ def serve(ctx, name: str, port: int):
|
|
|
96
108
|
@click.option("--max-jobs", type=int, default=10, help="Max concurrent jobs")
|
|
97
109
|
@click.pass_context
|
|
98
110
|
def node(ctx, name: str, port: int, network: str, models: tuple, max_jobs: int):
|
|
99
|
-
"""Start as a compute node for the Hanzo network
|
|
111
|
+
"""Alias for 'hanzo net' - Start as a compute node for the Hanzo network."""
|
|
100
112
|
asyncio.run(start_compute_node(ctx, name, port, network, models, max_jobs))
|
|
101
113
|
|
|
102
114
|
|
|
@@ -116,18 +128,12 @@ async def start_compute_node(ctx, name: str = None, port: int = 52415,
|
|
|
116
128
|
is_available, net_path, python_exe = check_net_installation()
|
|
117
129
|
|
|
118
130
|
if not is_available:
|
|
119
|
-
console.print("[red]Error:[/red] hanzo
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
console.print("\nTo fix, run:")
|
|
126
|
-
console.print(f" cd {net_path} && pip install -e .")
|
|
127
|
-
else:
|
|
128
|
-
console.print("\nTo install hanzo/net:")
|
|
129
|
-
console.print(" git clone https://github.com/hanzoai/net.git ~/work/hanzo/net")
|
|
130
|
-
console.print(" cd ~/work/hanzo/net && pip install -e .")
|
|
131
|
+
console.print("[red]Error:[/red] hanzo-net is not installed")
|
|
132
|
+
console.print("\nTo install hanzo-net from PyPI:")
|
|
133
|
+
console.print(" pip install hanzo-net")
|
|
134
|
+
console.print("\nOr for development, clone from GitHub:")
|
|
135
|
+
console.print(" git clone https://github.com/hanzoai/net.git ~/work/hanzo/net")
|
|
136
|
+
console.print(" cd ~/work/hanzo/net && pip install -e .")
|
|
131
137
|
return
|
|
132
138
|
|
|
133
139
|
try:
|
|
@@ -13,18 +13,20 @@ def check_net_installation() -> Tuple[bool, Optional[str], Optional[str]]:
|
|
|
13
13
|
Returns:
|
|
14
14
|
Tuple of (is_available, net_path, python_exe)
|
|
15
15
|
"""
|
|
16
|
-
#
|
|
16
|
+
# First try to import as PyPI package (hanzo-net)
|
|
17
|
+
try:
|
|
18
|
+
import net
|
|
19
|
+
return True, None, sys.executable
|
|
20
|
+
except ImportError:
|
|
21
|
+
pass
|
|
22
|
+
|
|
23
|
+
# For development: check for hanzo/net in standard location
|
|
17
24
|
net_path = Path.home() / "work" / "hanzo" / "net"
|
|
18
25
|
if not net_path.exists():
|
|
19
26
|
net_path = Path("/Users/z/work/hanzo/net")
|
|
20
27
|
|
|
21
28
|
if not net_path.exists():
|
|
22
|
-
|
|
23
|
-
try:
|
|
24
|
-
import net
|
|
25
|
-
return True, None, sys.executable
|
|
26
|
-
except ImportError:
|
|
27
|
-
return False, None, None
|
|
29
|
+
return False, None, None
|
|
28
30
|
|
|
29
31
|
# Check for venv
|
|
30
32
|
venv_python = net_path / ".venv" / "bin" / "python"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|