hanzo 0.1.0__py3-none-any.whl → 0.2.2__py3-none-any.whl

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/__init__.py CHANGED
@@ -1,12 +1,95 @@
1
- """Hanzo AI CLI - Unified CLI for Local, Private, Free AI Infrastructure.
1
+ """Hanzo AI - Complete AI Infrastructure Platform SDK.
2
2
 
3
- This package provides the 'hanzo' command which is a wrapper around hanzo-cli.
3
+ This is the main Hanzo SDK that provides:
4
+ - Router for LLM gateway (replaces litellm)
5
+ - MCP (Model Context Protocol) server and tools
6
+ - Agent runtime and orchestration
7
+ - Memory systems
8
+ - Network capabilities
9
+
10
+ CLI access is provided via the hanzo-cli package.
4
11
  """
5
12
 
6
- __version__ = "0.1.0"
13
+ __version__ = "0.2.2"
14
+
15
+ # Core exports
16
+ __all__ = [
17
+ # Version
18
+ "__version__",
19
+
20
+ # Router (primary LLM interface - replaces litellm)
21
+ "router",
22
+ "Router",
23
+ "completion",
24
+ "acompletion",
25
+ "embedding",
26
+ "aembedding",
27
+
28
+ # MCP
29
+ "mcp",
30
+ "MCPServer",
31
+ "Tool",
32
+
33
+ # Agents
34
+ "Agent",
35
+ "Network",
36
+ "AgentTool",
37
+
38
+ # Memory
39
+ "Memory",
40
+ "MemoryKV",
41
+ "MemoryVector",
42
+
43
+ # Core SDK
44
+ "Client",
45
+ "AsyncClient",
46
+ ]
47
+
48
+ # Export router as the primary LLM interface (replaces litellm)
49
+ try:
50
+ from . import router
51
+ from .router import Router, completion, acompletion, embedding, aembedding
52
+ # Make router the default for LLM operations
53
+ llm = router # Compatibility alias
54
+ except ImportError:
55
+ router = None
56
+ Router = None
57
+ completion = None
58
+ acompletion = None
59
+ embedding = None
60
+ aembedding = None
61
+ llm = None
62
+
63
+ # Export MCP capabilities
64
+ try:
65
+ import hanzo_mcp as mcp
66
+ from hanzo_mcp import Tool
67
+ from hanzo_mcp.server import MCPServer
68
+ except ImportError:
69
+ mcp = None
70
+ Tool = None
71
+ MCPServer = None
72
+
73
+ # Export agent components
74
+ try:
75
+ from hanzo_agents import Agent, Network
76
+ from hanzo_agents.core.tool import Tool as AgentTool
77
+ except ImportError:
78
+ Agent = None
79
+ Network = None
80
+ AgentTool = None
81
+
82
+ # Export memory systems
83
+ try:
84
+ from hanzo_memory import Memory, MemoryKV, MemoryVector
85
+ except ImportError:
86
+ Memory = None
87
+ MemoryKV = None
88
+ MemoryVector = None
7
89
 
8
- # Re-export everything from hanzo_cli if it's installed
90
+ # Export main SDK client
9
91
  try:
10
- from hanzo_cli import *
92
+ from hanzoai import Client, AsyncClient
11
93
  except ImportError:
12
- pass
94
+ Client = None
95
+ AsyncClient = None
hanzo/cli.py ADDED
@@ -0,0 +1,20 @@
1
+ """Main CLI entry point for Hanzo AI."""
2
+
3
+ import sys
4
+ import click
5
+ from importlib import import_module
6
+
7
+
8
+ def main():
9
+ """Main entry point for hanzo command - delegates to hanzo-cli."""
10
+ try:
11
+ # Import and run hanzo_cli
12
+ from hanzo_cli.cli import main as cli_main
13
+ cli_main()
14
+ except ImportError:
15
+ click.echo("Error: hanzo-cli is not installed. Please run: pip install hanzo[all]", err=True)
16
+ sys.exit(1)
17
+
18
+
19
+ if __name__ == "__main__":
20
+ main()
hanzo/mcp_server.py ADDED
@@ -0,0 +1,18 @@
1
+ """MCP server entry point for hanzo/mcp command."""
2
+
3
+ import sys
4
+ import click
5
+
6
+
7
+ def main():
8
+ """Start the Hanzo MCP server."""
9
+ try:
10
+ from hanzo_mcp.server import main as mcp_main
11
+ mcp_main()
12
+ except ImportError:
13
+ click.echo("Error: hanzo-mcp is not installed. Please run: pip install hanzo[mcp] or pip install hanzo[all]", err=True)
14
+ sys.exit(1)
15
+
16
+
17
+ if __name__ == "__main__":
18
+ main()
hanzo/repl.py ADDED
@@ -0,0 +1,35 @@
1
+ """REPL and AI chat entry points for Hanzo."""
2
+
3
+ import sys
4
+ import click
5
+
6
+
7
+ def ai_chat():
8
+ """Start AI chat interface (hanzo/ai or hanzo/chat)."""
9
+ try:
10
+ # Use hanzo-router instead of litellm for AI routing
11
+ from hanzo_repl.cli import main as repl_main
12
+ # Pass AI chat mode
13
+ sys.argv = [sys.argv[0], "--mode", "ai"]
14
+ repl_main()
15
+ except ImportError:
16
+ click.echo("Error: hanzo-repl or hanzo-router is not installed. Please run: pip install hanzo[ai] or pip install hanzo[all]", err=True)
17
+ sys.exit(1)
18
+
19
+
20
+ def repl_main():
21
+ """Start the Hanzo REPL interface (hanzo/repl)."""
22
+ try:
23
+ from hanzo_repl.cli import main as repl_cli_main
24
+ repl_cli_main()
25
+ except ImportError:
26
+ click.echo("Error: hanzo-repl is not installed. Please run: pip install hanzo[all]", err=True)
27
+ sys.exit(1)
28
+
29
+
30
+ if __name__ == "__main__":
31
+ import os
32
+ if os.path.basename(sys.argv[0]) in ["ai", "chat"]:
33
+ ai_chat()
34
+ else:
35
+ repl_main()
@@ -0,0 +1,21 @@
1
+ """Router module - re-exports from hanzo-router package."""
2
+
3
+ try:
4
+ # Import all exports from hanzo-router (which internally uses 'router' package name)
5
+ from router import *
6
+ from router import Router, completion, acompletion, embedding, aembedding
7
+
8
+ # Ensure these are explicitly available
9
+ __all__ = ["Router", "completion", "acompletion", "embedding", "aembedding"]
10
+ except ImportError as e:
11
+ # If hanzo-router is not installed, provide helpful error
12
+ import sys
13
+ print(f"Error importing router: {e}", file=sys.stderr)
14
+ print("Please install hanzo-router: pip install hanzo[router] or pip install hanzo[all]", file=sys.stderr)
15
+
16
+ # Define placeholders to avoid complete failure
17
+ Router = None
18
+ completion = None
19
+ acompletion = None
20
+ embedding = None
21
+ aembedding = None
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hanzo
3
- Version: 0.1.0
4
- Summary: Hanzo AI CLI - Unified CLI for Local, Private, Free AI Infrastructure
3
+ Version: 0.2.2
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
7
7
  Project-URL: Documentation, https://docs.hanzo.ai/cli
@@ -22,7 +22,33 @@ Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
23
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
24
  Requires-Python: >=3.8
25
+ Requires-Dist: click>=8.1.0
25
26
  Requires-Dist: hanzo-cli>=0.1.0
27
+ Requires-Dist: rich>=13.0.0
28
+ Provides-Extra: agents
29
+ Requires-Dist: hanzo-agents>=0.1.0; extra == 'agents'
30
+ Requires-Dist: hanzo-network>=0.1.0; extra == 'agents'
31
+ Provides-Extra: ai
32
+ Requires-Dist: hanzoai>=1.0.0; extra == 'ai'
33
+ Provides-Extra: all
34
+ Requires-Dist: hanzo-aci>=0.2.8; extra == 'all'
35
+ Requires-Dist: hanzo-agents>=0.1.0; extra == 'all'
36
+ Requires-Dist: hanzo-mcp-client>=0.1.0; extra == 'all'
37
+ Requires-Dist: hanzo-mcp>=0.7.0; extra == 'all'
38
+ Requires-Dist: hanzo-memory>=1.0.0; extra == 'all'
39
+ Requires-Dist: hanzo-network>=0.1.0; extra == 'all'
40
+ Requires-Dist: hanzo-repl>=0.1.0; extra == 'all'
41
+ Requires-Dist: hanzo-router>=1.74.3; extra == 'all'
42
+ Requires-Dist: hanzoai>=1.0.0; extra == 'all'
43
+ Provides-Extra: dev
44
+ Requires-Dist: hanzo-aci>=0.2.8; extra == 'dev'
45
+ Provides-Extra: mcp
46
+ Requires-Dist: hanzo-mcp>=0.7.0; extra == 'mcp'
47
+ Provides-Extra: repl
48
+ Requires-Dist: hanzo-repl>=0.1.0; extra == 'repl'
49
+ Requires-Dist: hanzo-router>=1.74.3; extra == 'repl'
50
+ Provides-Extra: router
51
+ Requires-Dist: hanzo-router>=1.74.3; extra == 'router'
26
52
  Description-Content-Type: text/markdown
27
53
 
28
54
  # Hanzo AI CLI
@@ -0,0 +1,9 @@
1
+ hanzo/__init__.py,sha256=0k__FKhxePI7TwN29mKW5kjP1uWxXF0bR8YFzv69HAY,1951
2
+ hanzo/cli.py,sha256=uLfrVV5FqW7D75N9rlYtHS5JwlXPiW6Wax9TVku6FRI,486
3
+ hanzo/mcp_server.py,sha256=FBqcXhaJgV8_9O83H3fUy_pv4cV1707XCYm7FXaJeWY,422
4
+ hanzo/repl.py,sha256=sC7EXbIBn7Oxnmzqey6neAg5-116gfpmrF0YFDYrhAQ,1014
5
+ hanzo/router/__init__.py,sha256=OkhSdzExF0KBEfkDiGpGp6_schsPDG0mSw-arq98OHc,822
6
+ hanzo-0.2.2.dist-info/METADATA,sha256=101ZA4VYkZi_JOUq8xPGVKiVlxzdn4z1_A_gfmjpaOI,2689
7
+ hanzo-0.2.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
+ hanzo-0.2.2.dist-info/entry_points.txt,sha256=pQLPMdqOXU_2BfTcMDhkqTCDNk_H6ApvYuSaWcuQOOw,171
9
+ hanzo-0.2.2.dist-info/RECORD,,
@@ -0,0 +1,6 @@
1
+ [console_scripts]
2
+ hanzo = hanzo.cli:main
3
+ hanzo-ai = hanzo.repl:ai_chat
4
+ hanzo-chat = hanzo.repl:ai_chat
5
+ hanzo-mcp = hanzo.mcp_server:main
6
+ hanzo-repl = hanzo.repl:repl_main
@@ -1,5 +0,0 @@
1
- hanzo/__init__.py,sha256=04uwVn6FFj6bgX30bXqg3Ge7IePPlwSZF9F7rKcEWb8,299
2
- hanzo-0.1.0.dist-info/METADATA,sha256=d5qaA1ntNmML8v19VRGs8nBjOk3heiYu_3askkqKYF8,1609
3
- hanzo-0.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
4
- hanzo-0.1.0.dist-info/entry_points.txt,sha256=8HaR6T2xnnBsWi_jXfn8CBVaKgVfbGjaLsj0gTjP_Zk,45
5
- hanzo-0.1.0.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- hanzo = hanzo_cli.cli:main
File without changes