hanzo-mcp 0.6.12__py3-none-any.whl → 0.7.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.
Potentially problematic release.
This version of hanzo-mcp might be problematic. Click here for more details.
- hanzo_mcp/__init__.py +2 -2
- hanzo_mcp/analytics/__init__.py +5 -0
- hanzo_mcp/analytics/posthog_analytics.py +364 -0
- hanzo_mcp/cli.py +5 -5
- hanzo_mcp/cli_enhanced.py +7 -7
- hanzo_mcp/cli_plugin.py +91 -0
- hanzo_mcp/config/__init__.py +1 -1
- hanzo_mcp/config/settings.py +70 -7
- hanzo_mcp/config/tool_config.py +20 -6
- hanzo_mcp/dev_server.py +3 -3
- hanzo_mcp/prompts/project_system.py +1 -1
- hanzo_mcp/server.py +40 -3
- hanzo_mcp/server_enhanced.py +69 -0
- hanzo_mcp/tools/__init__.py +140 -31
- hanzo_mcp/tools/agent/__init__.py +85 -4
- hanzo_mcp/tools/agent/agent_tool.py +104 -6
- hanzo_mcp/tools/agent/agent_tool_v2.py +459 -0
- hanzo_mcp/tools/agent/clarification_protocol.py +220 -0
- hanzo_mcp/tools/agent/clarification_tool.py +68 -0
- hanzo_mcp/tools/agent/claude_cli_tool.py +125 -0
- hanzo_mcp/tools/agent/claude_desktop_auth.py +508 -0
- hanzo_mcp/tools/agent/cli_agent_base.py +191 -0
- hanzo_mcp/tools/agent/code_auth.py +436 -0
- hanzo_mcp/tools/agent/code_auth_tool.py +194 -0
- hanzo_mcp/tools/agent/codex_cli_tool.py +123 -0
- hanzo_mcp/tools/agent/critic_tool.py +376 -0
- hanzo_mcp/tools/agent/gemini_cli_tool.py +128 -0
- hanzo_mcp/tools/agent/grok_cli_tool.py +128 -0
- hanzo_mcp/tools/agent/iching_tool.py +380 -0
- hanzo_mcp/tools/agent/network_tool.py +273 -0
- hanzo_mcp/tools/agent/prompt.py +62 -20
- hanzo_mcp/tools/agent/review_tool.py +433 -0
- hanzo_mcp/tools/agent/swarm_tool.py +535 -0
- hanzo_mcp/tools/agent/swarm_tool_v2.py +594 -0
- hanzo_mcp/tools/common/__init__.py +15 -1
- hanzo_mcp/tools/common/base.py +5 -4
- hanzo_mcp/tools/common/batch_tool.py +103 -11
- hanzo_mcp/tools/common/config_tool.py +2 -2
- hanzo_mcp/tools/common/context.py +2 -2
- hanzo_mcp/tools/common/context_fix.py +26 -0
- hanzo_mcp/tools/common/critic_tool.py +196 -0
- hanzo_mcp/tools/common/decorators.py +208 -0
- hanzo_mcp/tools/common/enhanced_base.py +106 -0
- hanzo_mcp/tools/common/fastmcp_pagination.py +369 -0
- hanzo_mcp/tools/common/forgiving_edit.py +243 -0
- hanzo_mcp/tools/common/mode.py +116 -0
- hanzo_mcp/tools/common/mode_loader.py +105 -0
- hanzo_mcp/tools/common/paginated_base.py +230 -0
- hanzo_mcp/tools/common/paginated_response.py +307 -0
- hanzo_mcp/tools/common/pagination.py +226 -0
- hanzo_mcp/tools/common/permissions.py +1 -1
- hanzo_mcp/tools/common/personality.py +936 -0
- hanzo_mcp/tools/common/plugin_loader.py +287 -0
- hanzo_mcp/tools/common/stats.py +4 -4
- hanzo_mcp/tools/common/tool_list.py +4 -1
- hanzo_mcp/tools/common/truncate.py +101 -0
- hanzo_mcp/tools/common/validation.py +1 -1
- hanzo_mcp/tools/config/__init__.py +3 -1
- hanzo_mcp/tools/config/config_tool.py +1 -1
- hanzo_mcp/tools/config/mode_tool.py +209 -0
- hanzo_mcp/tools/database/__init__.py +1 -1
- hanzo_mcp/tools/editor/__init__.py +1 -1
- hanzo_mcp/tools/filesystem/__init__.py +48 -14
- hanzo_mcp/tools/filesystem/ast_multi_edit.py +562 -0
- hanzo_mcp/tools/filesystem/batch_search.py +3 -3
- hanzo_mcp/tools/filesystem/diff.py +2 -2
- hanzo_mcp/tools/filesystem/directory_tree_paginated.py +338 -0
- hanzo_mcp/tools/filesystem/rules_tool.py +235 -0
- hanzo_mcp/tools/filesystem/{unified_search.py → search_tool.py} +12 -12
- hanzo_mcp/tools/filesystem/{symbols_unified.py → symbols_tool.py} +104 -5
- hanzo_mcp/tools/filesystem/watch.py +3 -2
- hanzo_mcp/tools/jupyter/__init__.py +2 -2
- hanzo_mcp/tools/jupyter/jupyter.py +1 -1
- hanzo_mcp/tools/llm/__init__.py +3 -3
- hanzo_mcp/tools/llm/llm_tool.py +648 -143
- hanzo_mcp/tools/lsp/__init__.py +5 -0
- hanzo_mcp/tools/lsp/lsp_tool.py +512 -0
- hanzo_mcp/tools/mcp/__init__.py +2 -2
- hanzo_mcp/tools/mcp/{mcp_unified.py → mcp_tool.py} +3 -3
- hanzo_mcp/tools/memory/__init__.py +76 -0
- hanzo_mcp/tools/memory/knowledge_tools.py +518 -0
- hanzo_mcp/tools/memory/memory_tools.py +456 -0
- hanzo_mcp/tools/search/__init__.py +6 -0
- hanzo_mcp/tools/search/find_tool.py +581 -0
- hanzo_mcp/tools/search/unified_search.py +953 -0
- hanzo_mcp/tools/shell/__init__.py +11 -6
- hanzo_mcp/tools/shell/auto_background.py +203 -0
- hanzo_mcp/tools/shell/base_process.py +57 -29
- hanzo_mcp/tools/shell/bash_session_executor.py +1 -1
- hanzo_mcp/tools/shell/{bash_unified.py → bash_tool.py} +18 -34
- hanzo_mcp/tools/shell/command_executor.py +2 -2
- hanzo_mcp/tools/shell/{npx_unified.py → npx_tool.py} +16 -33
- hanzo_mcp/tools/shell/open.py +2 -2
- hanzo_mcp/tools/shell/{process_unified.py → process_tool.py} +1 -1
- hanzo_mcp/tools/shell/run_command_windows.py +1 -1
- hanzo_mcp/tools/shell/streaming_command.py +594 -0
- hanzo_mcp/tools/shell/uvx.py +47 -2
- hanzo_mcp/tools/shell/uvx_background.py +47 -2
- hanzo_mcp/tools/shell/{uvx_unified.py → uvx_tool.py} +16 -33
- hanzo_mcp/tools/todo/__init__.py +14 -19
- hanzo_mcp/tools/todo/todo.py +22 -1
- hanzo_mcp/tools/vector/__init__.py +1 -1
- hanzo_mcp/tools/vector/infinity_store.py +2 -2
- hanzo_mcp/tools/vector/project_manager.py +1 -1
- hanzo_mcp/types.py +23 -0
- hanzo_mcp-0.7.0.dist-info/METADATA +516 -0
- hanzo_mcp-0.7.0.dist-info/RECORD +180 -0
- {hanzo_mcp-0.6.12.dist-info → hanzo_mcp-0.7.0.dist-info}/entry_points.txt +1 -0
- hanzo_mcp/tools/common/palette.py +0 -344
- hanzo_mcp/tools/common/palette_loader.py +0 -108
- hanzo_mcp/tools/config/palette_tool.py +0 -179
- hanzo_mcp/tools/llm/llm_unified.py +0 -851
- hanzo_mcp-0.6.12.dist-info/METADATA +0 -339
- hanzo_mcp-0.6.12.dist-info/RECORD +0 -135
- hanzo_mcp-0.6.12.dist-info/licenses/LICENSE +0 -21
- {hanzo_mcp-0.6.12.dist-info → hanzo_mcp-0.7.0.dist-info}/WHEEL +0 -0
- {hanzo_mcp-0.6.12.dist-info → hanzo_mcp-0.7.0.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Filesystem tools package for Hanzo
|
|
1
|
+
"""Filesystem tools package for Hanzo AI.
|
|
2
2
|
|
|
3
3
|
This package provides tools for interacting with the filesystem, including reading, writing,
|
|
4
4
|
and editing files, directory navigation, and content searching.
|
|
@@ -20,10 +20,18 @@ from hanzo_mcp.tools.filesystem.read import ReadTool
|
|
|
20
20
|
from hanzo_mcp.tools.filesystem.write import Write
|
|
21
21
|
from hanzo_mcp.tools.filesystem.batch_search import BatchSearchTool
|
|
22
22
|
from hanzo_mcp.tools.filesystem.find_files import FindFilesTool
|
|
23
|
-
from hanzo_mcp.tools.filesystem.
|
|
23
|
+
from hanzo_mcp.tools.filesystem.rules_tool import RulesTool
|
|
24
|
+
from hanzo_mcp.tools.filesystem.search_tool import SearchTool
|
|
24
25
|
from hanzo_mcp.tools.filesystem.watch import watch_tool
|
|
25
26
|
from hanzo_mcp.tools.filesystem.diff import create_diff_tool
|
|
26
27
|
|
|
28
|
+
# Import new search tools
|
|
29
|
+
try:
|
|
30
|
+
from hanzo_mcp.tools.search import UnifiedSearch, create_unified_search_tool, FindTool, create_find_tool
|
|
31
|
+
UNIFIED_SEARCH_AVAILABLE = True
|
|
32
|
+
except ImportError:
|
|
33
|
+
UNIFIED_SEARCH_AVAILABLE = False
|
|
34
|
+
|
|
27
35
|
# Export all tool classes
|
|
28
36
|
__all__ = [
|
|
29
37
|
"ReadTool",
|
|
@@ -37,7 +45,8 @@ __all__ = [
|
|
|
37
45
|
"GitSearchTool",
|
|
38
46
|
"BatchSearchTool",
|
|
39
47
|
"FindFilesTool",
|
|
40
|
-
"
|
|
48
|
+
"RulesTool",
|
|
49
|
+
"SearchTool",
|
|
41
50
|
"get_filesystem_tools",
|
|
42
51
|
"register_filesystem_tools",
|
|
43
52
|
]
|
|
@@ -51,7 +60,7 @@ def get_read_only_filesystem_tools(
|
|
|
51
60
|
|
|
52
61
|
Args:
|
|
53
62
|
permission_manager: Permission manager for access control
|
|
54
|
-
project_manager: Optional project manager for
|
|
63
|
+
project_manager: Optional project manager for search
|
|
55
64
|
|
|
56
65
|
Returns:
|
|
57
66
|
List of read-only filesystem tool instances
|
|
@@ -63,13 +72,21 @@ def get_read_only_filesystem_tools(
|
|
|
63
72
|
SymbolsTool(permission_manager),
|
|
64
73
|
GitSearchTool(permission_manager),
|
|
65
74
|
FindFilesTool(permission_manager),
|
|
75
|
+
RulesTool(permission_manager),
|
|
66
76
|
watch_tool,
|
|
67
77
|
create_diff_tool(permission_manager),
|
|
68
78
|
]
|
|
69
79
|
|
|
70
|
-
# Add
|
|
80
|
+
# Add search if project manager is available
|
|
71
81
|
if project_manager:
|
|
72
|
-
tools.append(
|
|
82
|
+
tools.append(SearchTool(permission_manager, project_manager))
|
|
83
|
+
|
|
84
|
+
# Add new search tools if available
|
|
85
|
+
if UNIFIED_SEARCH_AVAILABLE:
|
|
86
|
+
tools.extend([
|
|
87
|
+
create_unified_search_tool(),
|
|
88
|
+
create_find_tool()
|
|
89
|
+
])
|
|
73
90
|
|
|
74
91
|
return tools
|
|
75
92
|
|
|
@@ -79,7 +96,7 @@ def get_filesystem_tools(permission_manager: PermissionManager, project_manager=
|
|
|
79
96
|
|
|
80
97
|
Args:
|
|
81
98
|
permission_manager: Permission manager for access control
|
|
82
|
-
project_manager: Optional project manager for
|
|
99
|
+
project_manager: Optional project manager for search
|
|
83
100
|
|
|
84
101
|
Returns:
|
|
85
102
|
List of filesystem tool instances
|
|
@@ -95,13 +112,21 @@ def get_filesystem_tools(permission_manager: PermissionManager, project_manager=
|
|
|
95
112
|
SymbolsTool(permission_manager),
|
|
96
113
|
GitSearchTool(permission_manager),
|
|
97
114
|
FindFilesTool(permission_manager),
|
|
115
|
+
RulesTool(permission_manager),
|
|
98
116
|
watch_tool,
|
|
99
117
|
create_diff_tool(permission_manager),
|
|
100
118
|
]
|
|
101
119
|
|
|
102
|
-
# Add
|
|
120
|
+
# Add search if project manager is available
|
|
103
121
|
if project_manager:
|
|
104
|
-
tools.append(
|
|
122
|
+
tools.append(SearchTool(permission_manager, project_manager))
|
|
123
|
+
|
|
124
|
+
# Add new search tools if available
|
|
125
|
+
if UNIFIED_SEARCH_AVAILABLE:
|
|
126
|
+
tools.extend([
|
|
127
|
+
create_unified_search_tool(),
|
|
128
|
+
create_find_tool()
|
|
129
|
+
])
|
|
105
130
|
|
|
106
131
|
return tools
|
|
107
132
|
|
|
@@ -122,7 +147,7 @@ def register_filesystem_tools(
|
|
|
122
147
|
disable_write_tools: Whether to disable write tools (default: False)
|
|
123
148
|
disable_search_tools: Whether to disable search tools (default: False)
|
|
124
149
|
enabled_tools: Dictionary of individual tool enable states (default: None)
|
|
125
|
-
project_manager: Optional project manager for
|
|
150
|
+
project_manager: Optional project manager for search (default: None)
|
|
126
151
|
|
|
127
152
|
Returns:
|
|
128
153
|
List of registered tools
|
|
@@ -135,16 +160,22 @@ def register_filesystem_tools(
|
|
|
135
160
|
"multi_edit": MultiEdit,
|
|
136
161
|
"directory_tree": DirectoryTreeTool,
|
|
137
162
|
"grep": Grep,
|
|
138
|
-
"
|
|
163
|
+
"symbols": SymbolsTool, # Unified symbols tool with grep_ast functionality
|
|
139
164
|
"git_search": GitSearchTool,
|
|
140
165
|
"content_replace": ContentReplaceTool,
|
|
141
166
|
"batch_search": BatchSearchTool,
|
|
142
167
|
"find_files": FindFilesTool,
|
|
143
|
-
"
|
|
168
|
+
"rules": RulesTool,
|
|
169
|
+
"search": SearchTool,
|
|
144
170
|
"watch": lambda pm: watch_tool, # Singleton instance
|
|
145
171
|
"diff": create_diff_tool,
|
|
146
172
|
}
|
|
147
173
|
|
|
174
|
+
# Add new search tools if available
|
|
175
|
+
if UNIFIED_SEARCH_AVAILABLE:
|
|
176
|
+
tool_classes["unified_search"] = lambda pm: create_unified_search_tool()
|
|
177
|
+
tool_classes["find"] = lambda pm: create_find_tool()
|
|
178
|
+
|
|
148
179
|
tools = []
|
|
149
180
|
|
|
150
181
|
if enabled_tools:
|
|
@@ -152,12 +183,15 @@ def register_filesystem_tools(
|
|
|
152
183
|
for tool_name, enabled in enabled_tools.items():
|
|
153
184
|
if enabled and tool_name in tool_classes:
|
|
154
185
|
tool_class = tool_classes[tool_name]
|
|
155
|
-
if tool_name in ["batch_search", "
|
|
156
|
-
# Batch search and
|
|
186
|
+
if tool_name in ["batch_search", "search"]:
|
|
187
|
+
# Batch search and search require project_manager
|
|
157
188
|
tools.append(tool_class(permission_manager, project_manager))
|
|
158
189
|
elif tool_name == "watch":
|
|
159
190
|
# Watch tool is a singleton
|
|
160
191
|
tools.append(tool_class(permission_manager))
|
|
192
|
+
elif tool_name in ["unified_search", "find"]:
|
|
193
|
+
# New search tools are factory functions
|
|
194
|
+
tools.append(tool_class(permission_manager))
|
|
161
195
|
else:
|
|
162
196
|
tools.append(tool_class(permission_manager))
|
|
163
197
|
else:
|