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,179 +0,0 @@
|
|
|
1
|
-
"""Tool for managing development tool palettes."""
|
|
2
|
-
|
|
3
|
-
from typing import Optional, override
|
|
4
|
-
|
|
5
|
-
from mcp.server.fastmcp import Context as MCPContext
|
|
6
|
-
|
|
7
|
-
from hanzo_mcp.tools.common.base import BaseTool
|
|
8
|
-
from hanzo_mcp.tools.common.palette import PaletteRegistry, register_default_palettes
|
|
9
|
-
from mcp.server import FastMCP
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class PaletteTool(BaseTool):
|
|
13
|
-
"""Tool for managing tool palettes."""
|
|
14
|
-
|
|
15
|
-
name = "palette"
|
|
16
|
-
|
|
17
|
-
def __init__(self):
|
|
18
|
-
"""Initialize the palette tool."""
|
|
19
|
-
super().__init__()
|
|
20
|
-
# Register default palettes on initialization
|
|
21
|
-
register_default_palettes()
|
|
22
|
-
|
|
23
|
-
@property
|
|
24
|
-
@override
|
|
25
|
-
def description(self) -> str:
|
|
26
|
-
"""Get the tool description."""
|
|
27
|
-
return """Manage tool palettes. Actions: list (default), activate, show, current.
|
|
28
|
-
|
|
29
|
-
Usage:
|
|
30
|
-
palette
|
|
31
|
-
palette --action list
|
|
32
|
-
palette --action activate python
|
|
33
|
-
palette --action show javascript
|
|
34
|
-
palette --action current"""
|
|
35
|
-
|
|
36
|
-
@override
|
|
37
|
-
async def run(
|
|
38
|
-
self,
|
|
39
|
-
ctx: MCPContext,
|
|
40
|
-
action: str = "list",
|
|
41
|
-
name: Optional[str] = None,
|
|
42
|
-
) -> str:
|
|
43
|
-
"""Manage tool palettes.
|
|
44
|
-
|
|
45
|
-
Args:
|
|
46
|
-
ctx: MCP context
|
|
47
|
-
action: Action to perform (list, activate, show, current)
|
|
48
|
-
name: Palette name (for activate/show actions)
|
|
49
|
-
|
|
50
|
-
Returns:
|
|
51
|
-
Action result
|
|
52
|
-
"""
|
|
53
|
-
if action == "list":
|
|
54
|
-
palettes = PaletteRegistry.list()
|
|
55
|
-
if not palettes:
|
|
56
|
-
return "No palettes registered"
|
|
57
|
-
|
|
58
|
-
output = ["Available tool palettes:"]
|
|
59
|
-
active = PaletteRegistry.get_active()
|
|
60
|
-
|
|
61
|
-
for palette in sorted(palettes, key=lambda p: p.name):
|
|
62
|
-
marker = " (active)" if active and active.name == palette.name else ""
|
|
63
|
-
author = f" by {palette.author}" if palette.author else ""
|
|
64
|
-
output.append(f"\n{palette.name}{marker}:")
|
|
65
|
-
output.append(f" {palette.description}{author}")
|
|
66
|
-
output.append(f" Tools: {len(palette.tools)} enabled")
|
|
67
|
-
|
|
68
|
-
return "\n".join(output)
|
|
69
|
-
|
|
70
|
-
elif action == "activate":
|
|
71
|
-
if not name:
|
|
72
|
-
return "Error: Palette name required for activate action"
|
|
73
|
-
|
|
74
|
-
try:
|
|
75
|
-
PaletteRegistry.set_active(name)
|
|
76
|
-
palette = PaletteRegistry.get(name)
|
|
77
|
-
|
|
78
|
-
output = [f"Activated palette: {palette.name}"]
|
|
79
|
-
if palette.author:
|
|
80
|
-
output.append(f"Author: {palette.author}")
|
|
81
|
-
output.append(f"Description: {palette.description}")
|
|
82
|
-
output.append(f"\nEnabled tools ({len(palette.tools)}):")
|
|
83
|
-
|
|
84
|
-
# Group tools by category
|
|
85
|
-
core_tools = []
|
|
86
|
-
package_tools = []
|
|
87
|
-
other_tools = []
|
|
88
|
-
|
|
89
|
-
for tool in sorted(palette.tools):
|
|
90
|
-
if tool in ["read", "write", "edit", "grep", "tree", "find", "bash"]:
|
|
91
|
-
core_tools.append(tool)
|
|
92
|
-
elif tool in ["npx", "uvx", "pip", "cargo", "gem"]:
|
|
93
|
-
package_tools.append(tool)
|
|
94
|
-
else:
|
|
95
|
-
other_tools.append(tool)
|
|
96
|
-
|
|
97
|
-
if core_tools:
|
|
98
|
-
output.append(f" Core: {', '.join(core_tools)}")
|
|
99
|
-
if package_tools:
|
|
100
|
-
output.append(f" Package managers: {', '.join(package_tools)}")
|
|
101
|
-
if other_tools:
|
|
102
|
-
output.append(f" Specialized: {', '.join(other_tools)}")
|
|
103
|
-
|
|
104
|
-
if palette.environment:
|
|
105
|
-
output.append("\nEnvironment variables:")
|
|
106
|
-
for key, value in palette.environment.items():
|
|
107
|
-
output.append(f" {key}={value}")
|
|
108
|
-
|
|
109
|
-
output.append("\nNote: Restart MCP session for changes to take full effect")
|
|
110
|
-
|
|
111
|
-
return "\n".join(output)
|
|
112
|
-
|
|
113
|
-
except ValueError as e:
|
|
114
|
-
return str(e)
|
|
115
|
-
|
|
116
|
-
elif action == "show":
|
|
117
|
-
if not name:
|
|
118
|
-
return "Error: Palette name required for show action"
|
|
119
|
-
|
|
120
|
-
palette = PaletteRegistry.get(name)
|
|
121
|
-
if not palette:
|
|
122
|
-
return f"Palette '{name}' not found"
|
|
123
|
-
|
|
124
|
-
output = [f"Palette: {palette.name}"]
|
|
125
|
-
if palette.author:
|
|
126
|
-
output.append(f"Author: {palette.author}")
|
|
127
|
-
output.append(f"Description: {palette.description}")
|
|
128
|
-
output.append(f"\nTools ({len(palette.tools)}):")
|
|
129
|
-
|
|
130
|
-
for tool in sorted(palette.tools):
|
|
131
|
-
output.append(f" - {tool}")
|
|
132
|
-
|
|
133
|
-
if palette.environment:
|
|
134
|
-
output.append("\nEnvironment:")
|
|
135
|
-
for key, value in palette.environment.items():
|
|
136
|
-
output.append(f" {key}={value}")
|
|
137
|
-
|
|
138
|
-
return "\n".join(output)
|
|
139
|
-
|
|
140
|
-
elif action == "current":
|
|
141
|
-
active = PaletteRegistry.get_active()
|
|
142
|
-
if not active:
|
|
143
|
-
return "No palette currently active\nUse 'palette --action activate <name>' to activate one"
|
|
144
|
-
|
|
145
|
-
output = [f"Current palette: {active.name}"]
|
|
146
|
-
if active.author:
|
|
147
|
-
output.append(f"Author: {active.author}")
|
|
148
|
-
output.append(f"Description: {active.description}")
|
|
149
|
-
output.append(f"Enabled tools: {len(active.tools)}")
|
|
150
|
-
|
|
151
|
-
return "\n".join(output)
|
|
152
|
-
|
|
153
|
-
else:
|
|
154
|
-
return f"Unknown action: {action}. Use 'list', 'activate', 'show', or 'current'"
|
|
155
|
-
|
|
156
|
-
def register(self, server: FastMCP) -> None:
|
|
157
|
-
"""Register the tool with the MCP server."""
|
|
158
|
-
tool_self = self
|
|
159
|
-
|
|
160
|
-
@server.tool(name=self.name, description=self.description)
|
|
161
|
-
async def palette_handler(
|
|
162
|
-
ctx: MCPContext,
|
|
163
|
-
action: str = "list",
|
|
164
|
-
name: Optional[str] = None,
|
|
165
|
-
) -> str:
|
|
166
|
-
"""Handle palette tool calls."""
|
|
167
|
-
return await tool_self.run(ctx, action=action, name=name)
|
|
168
|
-
|
|
169
|
-
async def call(self, ctx: MCPContext, **params) -> str:
|
|
170
|
-
"""Call the tool with arguments."""
|
|
171
|
-
return await self.run(
|
|
172
|
-
ctx,
|
|
173
|
-
action=params.get("action", "list"),
|
|
174
|
-
name=params.get("name")
|
|
175
|
-
)
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
# Create tool instance
|
|
179
|
-
palette_tool = PaletteTool()
|