hanzo-tools 0.1.0__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.
hanzo_tools/__init__.py
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"""Hanzo Tools - Modular tool packages for AI agents.
|
|
2
|
+
|
|
3
|
+
Installation:
|
|
4
|
+
pip install hanzo-tools # Core only
|
|
5
|
+
pip install hanzo-tools[core] # filesystem, shell, todo
|
|
6
|
+
pip install hanzo-tools[dev] # core + editor, lsp, refactor
|
|
7
|
+
pip install hanzo-tools[ai] # llm, agent, memory
|
|
8
|
+
pip install hanzo-tools[all] # Everything
|
|
9
|
+
|
|
10
|
+
Individual packages:
|
|
11
|
+
pip install hanzo-tools-filesystem
|
|
12
|
+
pip install hanzo-tools-shell
|
|
13
|
+
pip install hanzo-tools-browser
|
|
14
|
+
pip install hanzo-tools-llm
|
|
15
|
+
pip install hanzo-tools-database
|
|
16
|
+
pip install hanzo-tools-memory
|
|
17
|
+
pip install hanzo-tools-agent
|
|
18
|
+
pip install hanzo-tools-editor
|
|
19
|
+
pip install hanzo-tools-jupyter
|
|
20
|
+
pip install hanzo-tools-lsp
|
|
21
|
+
pip install hanzo-tools-refactor
|
|
22
|
+
pip install hanzo-tools-vector
|
|
23
|
+
pip install hanzo-tools-todo
|
|
24
|
+
|
|
25
|
+
Usage:
|
|
26
|
+
from hanzo_tools.filesystem import register_tools as register_fs
|
|
27
|
+
from hanzo_tools.shell import register_tools as register_shell
|
|
28
|
+
|
|
29
|
+
# Register with MCP server
|
|
30
|
+
register_fs(mcp_server, permission_manager)
|
|
31
|
+
register_shell(mcp_server)
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
__version__ = "0.1.0"
|
|
35
|
+
|
|
36
|
+
# Namespace package
|
|
37
|
+
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def discover_tools():
|
|
41
|
+
"""Discover all installed tool packages.
|
|
42
|
+
|
|
43
|
+
Uses entry points to find hanzo.tools plugins.
|
|
44
|
+
|
|
45
|
+
Returns:
|
|
46
|
+
Dict of package_name -> tools list
|
|
47
|
+
"""
|
|
48
|
+
import importlib.metadata
|
|
49
|
+
|
|
50
|
+
tools = {}
|
|
51
|
+
|
|
52
|
+
try:
|
|
53
|
+
eps = importlib.metadata.entry_points(group="hanzo.tools")
|
|
54
|
+
for ep in eps:
|
|
55
|
+
try:
|
|
56
|
+
module = ep.load()
|
|
57
|
+
if hasattr(module, "TOOLS"):
|
|
58
|
+
tools[ep.name] = module.TOOLS
|
|
59
|
+
except Exception:
|
|
60
|
+
pass
|
|
61
|
+
except Exception:
|
|
62
|
+
pass
|
|
63
|
+
|
|
64
|
+
return tools
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def register_all(mcp_server, permission_manager=None, enabled_tools=None):
|
|
68
|
+
"""Register all discovered tools with the MCP server.
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
mcp_server: FastMCP server instance
|
|
72
|
+
permission_manager: Optional permission manager
|
|
73
|
+
enabled_tools: Dict of tool_name -> enabled state
|
|
74
|
+
|
|
75
|
+
Returns:
|
|
76
|
+
List of registered tool instances
|
|
77
|
+
"""
|
|
78
|
+
import importlib.metadata
|
|
79
|
+
|
|
80
|
+
registered = []
|
|
81
|
+
enabled = enabled_tools or {}
|
|
82
|
+
|
|
83
|
+
try:
|
|
84
|
+
eps = importlib.metadata.entry_points(group="hanzo.tools")
|
|
85
|
+
for ep in eps:
|
|
86
|
+
# Check if package is enabled
|
|
87
|
+
if not enabled.get(ep.name, True):
|
|
88
|
+
continue
|
|
89
|
+
|
|
90
|
+
try:
|
|
91
|
+
module_parent = ep.value.rsplit(":", 1)[0]
|
|
92
|
+
module = __import__(module_parent, fromlist=["register_tools"])
|
|
93
|
+
|
|
94
|
+
if hasattr(module, "register_tools"):
|
|
95
|
+
try:
|
|
96
|
+
tools = module.register_tools(
|
|
97
|
+
mcp_server,
|
|
98
|
+
permission_manager=permission_manager,
|
|
99
|
+
enabled_tools=enabled,
|
|
100
|
+
)
|
|
101
|
+
except TypeError:
|
|
102
|
+
# Some tools don't need permission_manager
|
|
103
|
+
tools = module.register_tools(mcp_server, enabled_tools=enabled)
|
|
104
|
+
|
|
105
|
+
if tools:
|
|
106
|
+
registered.extend(tools)
|
|
107
|
+
except Exception as e:
|
|
108
|
+
print(f"Failed to register {ep.name}: {e}")
|
|
109
|
+
except Exception:
|
|
110
|
+
pass
|
|
111
|
+
|
|
112
|
+
return registered
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hanzo-tools
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: All Hanzo AI tools - install everything at once
|
|
5
|
+
Author-email: Hanzo Industries Inc <dev@hanzo.ai>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/hanzoai/python-sdk
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/hanzoai/python-sdk/issues
|
|
9
|
+
Keywords: hanzo,tools,mcp,ai,agent
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Requires-Python: >=3.12
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
Requires-Dist: hanzo-tools-core>=0.1.0
|
|
16
|
+
Provides-Extra: filesystem
|
|
17
|
+
Requires-Dist: hanzo-tools-filesystem>=0.1.0; extra == "filesystem"
|
|
18
|
+
Provides-Extra: shell
|
|
19
|
+
Requires-Dist: hanzo-tools-shell>=0.1.0; extra == "shell"
|
|
20
|
+
Provides-Extra: browser
|
|
21
|
+
Requires-Dist: hanzo-tools-browser>=0.1.0; extra == "browser"
|
|
22
|
+
Provides-Extra: llm
|
|
23
|
+
Requires-Dist: hanzo-tools-llm>=0.1.0; extra == "llm"
|
|
24
|
+
Provides-Extra: database
|
|
25
|
+
Requires-Dist: hanzo-tools-database>=0.1.0; extra == "database"
|
|
26
|
+
Provides-Extra: memory
|
|
27
|
+
Requires-Dist: hanzo-tools-memory>=0.1.0; extra == "memory"
|
|
28
|
+
Provides-Extra: agent
|
|
29
|
+
Requires-Dist: hanzo-tools-agent>=0.1.0; extra == "agent"
|
|
30
|
+
Provides-Extra: editor
|
|
31
|
+
Requires-Dist: hanzo-tools-editor>=0.1.0; extra == "editor"
|
|
32
|
+
Provides-Extra: jupyter
|
|
33
|
+
Requires-Dist: hanzo-tools-jupyter>=0.1.0; extra == "jupyter"
|
|
34
|
+
Provides-Extra: lsp
|
|
35
|
+
Requires-Dist: hanzo-tools-lsp>=0.1.0; extra == "lsp"
|
|
36
|
+
Provides-Extra: refactor
|
|
37
|
+
Requires-Dist: hanzo-tools-refactor>=0.1.0; extra == "refactor"
|
|
38
|
+
Provides-Extra: vector
|
|
39
|
+
Requires-Dist: hanzo-tools-vector>=0.1.0; extra == "vector"
|
|
40
|
+
Provides-Extra: todo
|
|
41
|
+
Requires-Dist: hanzo-tools-todo>=0.1.0; extra == "todo"
|
|
42
|
+
Provides-Extra: config
|
|
43
|
+
Requires-Dist: hanzo-tools-config>=0.1.0; extra == "config"
|
|
44
|
+
Provides-Extra: mcp-tools
|
|
45
|
+
Requires-Dist: hanzo-tools-mcp>=0.1.0; extra == "mcp-tools"
|
|
46
|
+
Provides-Extra: reasoning
|
|
47
|
+
Requires-Dist: hanzo-tools-reasoning>=0.1.0; extra == "reasoning"
|
|
48
|
+
Provides-Extra: core
|
|
49
|
+
Requires-Dist: hanzo-tools-filesystem>=0.1.0; extra == "core"
|
|
50
|
+
Requires-Dist: hanzo-tools-shell>=0.1.0; extra == "core"
|
|
51
|
+
Requires-Dist: hanzo-tools-todo>=0.1.0; extra == "core"
|
|
52
|
+
Requires-Dist: hanzo-tools-reasoning>=0.1.0; extra == "core"
|
|
53
|
+
Requires-Dist: hanzo-tools-config>=0.1.0; extra == "core"
|
|
54
|
+
Provides-Extra: dev
|
|
55
|
+
Requires-Dist: hanzo-tools[core]; extra == "dev"
|
|
56
|
+
Requires-Dist: hanzo-tools-editor>=0.1.0; extra == "dev"
|
|
57
|
+
Requires-Dist: hanzo-tools-lsp>=0.1.0; extra == "dev"
|
|
58
|
+
Requires-Dist: hanzo-tools-refactor>=0.1.0; extra == "dev"
|
|
59
|
+
Provides-Extra: ai
|
|
60
|
+
Requires-Dist: hanzo-tools-llm>=0.1.0; extra == "ai"
|
|
61
|
+
Requires-Dist: hanzo-tools-agent>=0.1.0; extra == "ai"
|
|
62
|
+
Requires-Dist: hanzo-tools-memory>=0.1.0; extra == "ai"
|
|
63
|
+
Provides-Extra: all
|
|
64
|
+
Requires-Dist: hanzo-tools-filesystem>=0.1.0; extra == "all"
|
|
65
|
+
Requires-Dist: hanzo-tools-shell>=0.1.0; extra == "all"
|
|
66
|
+
Requires-Dist: hanzo-tools-browser>=0.1.0; extra == "all"
|
|
67
|
+
Requires-Dist: hanzo-tools-llm>=0.1.0; extra == "all"
|
|
68
|
+
Requires-Dist: hanzo-tools-database>=0.1.0; extra == "all"
|
|
69
|
+
Requires-Dist: hanzo-tools-memory>=0.1.0; extra == "all"
|
|
70
|
+
Requires-Dist: hanzo-tools-agent>=0.1.0; extra == "all"
|
|
71
|
+
Requires-Dist: hanzo-tools-editor>=0.1.0; extra == "all"
|
|
72
|
+
Requires-Dist: hanzo-tools-jupyter>=0.1.0; extra == "all"
|
|
73
|
+
Requires-Dist: hanzo-tools-lsp>=0.1.0; extra == "all"
|
|
74
|
+
Requires-Dist: hanzo-tools-refactor>=0.1.0; extra == "all"
|
|
75
|
+
Requires-Dist: hanzo-tools-vector>=0.1.0; extra == "all"
|
|
76
|
+
Requires-Dist: hanzo-tools-todo>=0.1.0; extra == "all"
|
|
77
|
+
Requires-Dist: hanzo-tools-reasoning>=0.1.0; extra == "all"
|
|
78
|
+
Requires-Dist: hanzo-tools-config>=0.1.0; extra == "all"
|
|
79
|
+
Requires-Dist: hanzo-tools-mcp>=0.1.0; extra == "all"
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
hanzo_tools/__init__.py,sha256=Yp58Bh_XOsTkqJDadEZBsxbcCROfAu0mJGlcFeu40nw,3355
|
|
2
|
+
hanzo_tools-0.1.0.dist-info/METADATA,sha256=SXVycqwGwd5OI5S3XXyLDnHINVYM4KTz5N1DRiEuUCY,3600
|
|
3
|
+
hanzo_tools-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
4
|
+
hanzo_tools-0.1.0.dist-info/top_level.txt,sha256=u-f24i29giR6MML9Xz5A7g00IWCUX70paauF1L0B-Ic,12
|
|
5
|
+
hanzo_tools-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
hanzo_tools
|