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.

Files changed (117) hide show
  1. hanzo_mcp/__init__.py +2 -2
  2. hanzo_mcp/analytics/__init__.py +5 -0
  3. hanzo_mcp/analytics/posthog_analytics.py +364 -0
  4. hanzo_mcp/cli.py +5 -5
  5. hanzo_mcp/cli_enhanced.py +7 -7
  6. hanzo_mcp/cli_plugin.py +91 -0
  7. hanzo_mcp/config/__init__.py +1 -1
  8. hanzo_mcp/config/settings.py +70 -7
  9. hanzo_mcp/config/tool_config.py +20 -6
  10. hanzo_mcp/dev_server.py +3 -3
  11. hanzo_mcp/prompts/project_system.py +1 -1
  12. hanzo_mcp/server.py +40 -3
  13. hanzo_mcp/server_enhanced.py +69 -0
  14. hanzo_mcp/tools/__init__.py +140 -31
  15. hanzo_mcp/tools/agent/__init__.py +85 -4
  16. hanzo_mcp/tools/agent/agent_tool.py +104 -6
  17. hanzo_mcp/tools/agent/agent_tool_v2.py +459 -0
  18. hanzo_mcp/tools/agent/clarification_protocol.py +220 -0
  19. hanzo_mcp/tools/agent/clarification_tool.py +68 -0
  20. hanzo_mcp/tools/agent/claude_cli_tool.py +125 -0
  21. hanzo_mcp/tools/agent/claude_desktop_auth.py +508 -0
  22. hanzo_mcp/tools/agent/cli_agent_base.py +191 -0
  23. hanzo_mcp/tools/agent/code_auth.py +436 -0
  24. hanzo_mcp/tools/agent/code_auth_tool.py +194 -0
  25. hanzo_mcp/tools/agent/codex_cli_tool.py +123 -0
  26. hanzo_mcp/tools/agent/critic_tool.py +376 -0
  27. hanzo_mcp/tools/agent/gemini_cli_tool.py +128 -0
  28. hanzo_mcp/tools/agent/grok_cli_tool.py +128 -0
  29. hanzo_mcp/tools/agent/iching_tool.py +380 -0
  30. hanzo_mcp/tools/agent/network_tool.py +273 -0
  31. hanzo_mcp/tools/agent/prompt.py +62 -20
  32. hanzo_mcp/tools/agent/review_tool.py +433 -0
  33. hanzo_mcp/tools/agent/swarm_tool.py +535 -0
  34. hanzo_mcp/tools/agent/swarm_tool_v2.py +594 -0
  35. hanzo_mcp/tools/common/__init__.py +15 -1
  36. hanzo_mcp/tools/common/base.py +5 -4
  37. hanzo_mcp/tools/common/batch_tool.py +103 -11
  38. hanzo_mcp/tools/common/config_tool.py +2 -2
  39. hanzo_mcp/tools/common/context.py +2 -2
  40. hanzo_mcp/tools/common/context_fix.py +26 -0
  41. hanzo_mcp/tools/common/critic_tool.py +196 -0
  42. hanzo_mcp/tools/common/decorators.py +208 -0
  43. hanzo_mcp/tools/common/enhanced_base.py +106 -0
  44. hanzo_mcp/tools/common/fastmcp_pagination.py +369 -0
  45. hanzo_mcp/tools/common/forgiving_edit.py +243 -0
  46. hanzo_mcp/tools/common/mode.py +116 -0
  47. hanzo_mcp/tools/common/mode_loader.py +105 -0
  48. hanzo_mcp/tools/common/paginated_base.py +230 -0
  49. hanzo_mcp/tools/common/paginated_response.py +307 -0
  50. hanzo_mcp/tools/common/pagination.py +226 -0
  51. hanzo_mcp/tools/common/permissions.py +1 -1
  52. hanzo_mcp/tools/common/personality.py +936 -0
  53. hanzo_mcp/tools/common/plugin_loader.py +287 -0
  54. hanzo_mcp/tools/common/stats.py +4 -4
  55. hanzo_mcp/tools/common/tool_list.py +4 -1
  56. hanzo_mcp/tools/common/truncate.py +101 -0
  57. hanzo_mcp/tools/common/validation.py +1 -1
  58. hanzo_mcp/tools/config/__init__.py +3 -1
  59. hanzo_mcp/tools/config/config_tool.py +1 -1
  60. hanzo_mcp/tools/config/mode_tool.py +209 -0
  61. hanzo_mcp/tools/database/__init__.py +1 -1
  62. hanzo_mcp/tools/editor/__init__.py +1 -1
  63. hanzo_mcp/tools/filesystem/__init__.py +48 -14
  64. hanzo_mcp/tools/filesystem/ast_multi_edit.py +562 -0
  65. hanzo_mcp/tools/filesystem/batch_search.py +3 -3
  66. hanzo_mcp/tools/filesystem/diff.py +2 -2
  67. hanzo_mcp/tools/filesystem/directory_tree_paginated.py +338 -0
  68. hanzo_mcp/tools/filesystem/rules_tool.py +235 -0
  69. hanzo_mcp/tools/filesystem/{unified_search.py → search_tool.py} +12 -12
  70. hanzo_mcp/tools/filesystem/{symbols_unified.py → symbols_tool.py} +104 -5
  71. hanzo_mcp/tools/filesystem/watch.py +3 -2
  72. hanzo_mcp/tools/jupyter/__init__.py +2 -2
  73. hanzo_mcp/tools/jupyter/jupyter.py +1 -1
  74. hanzo_mcp/tools/llm/__init__.py +3 -3
  75. hanzo_mcp/tools/llm/llm_tool.py +648 -143
  76. hanzo_mcp/tools/lsp/__init__.py +5 -0
  77. hanzo_mcp/tools/lsp/lsp_tool.py +512 -0
  78. hanzo_mcp/tools/mcp/__init__.py +2 -2
  79. hanzo_mcp/tools/mcp/{mcp_unified.py → mcp_tool.py} +3 -3
  80. hanzo_mcp/tools/memory/__init__.py +76 -0
  81. hanzo_mcp/tools/memory/knowledge_tools.py +518 -0
  82. hanzo_mcp/tools/memory/memory_tools.py +456 -0
  83. hanzo_mcp/tools/search/__init__.py +6 -0
  84. hanzo_mcp/tools/search/find_tool.py +581 -0
  85. hanzo_mcp/tools/search/unified_search.py +953 -0
  86. hanzo_mcp/tools/shell/__init__.py +11 -6
  87. hanzo_mcp/tools/shell/auto_background.py +203 -0
  88. hanzo_mcp/tools/shell/base_process.py +57 -29
  89. hanzo_mcp/tools/shell/bash_session_executor.py +1 -1
  90. hanzo_mcp/tools/shell/{bash_unified.py → bash_tool.py} +18 -34
  91. hanzo_mcp/tools/shell/command_executor.py +2 -2
  92. hanzo_mcp/tools/shell/{npx_unified.py → npx_tool.py} +16 -33
  93. hanzo_mcp/tools/shell/open.py +2 -2
  94. hanzo_mcp/tools/shell/{process_unified.py → process_tool.py} +1 -1
  95. hanzo_mcp/tools/shell/run_command_windows.py +1 -1
  96. hanzo_mcp/tools/shell/streaming_command.py +594 -0
  97. hanzo_mcp/tools/shell/uvx.py +47 -2
  98. hanzo_mcp/tools/shell/uvx_background.py +47 -2
  99. hanzo_mcp/tools/shell/{uvx_unified.py → uvx_tool.py} +16 -33
  100. hanzo_mcp/tools/todo/__init__.py +14 -19
  101. hanzo_mcp/tools/todo/todo.py +22 -1
  102. hanzo_mcp/tools/vector/__init__.py +1 -1
  103. hanzo_mcp/tools/vector/infinity_store.py +2 -2
  104. hanzo_mcp/tools/vector/project_manager.py +1 -1
  105. hanzo_mcp/types.py +23 -0
  106. hanzo_mcp-0.7.0.dist-info/METADATA +516 -0
  107. hanzo_mcp-0.7.0.dist-info/RECORD +180 -0
  108. {hanzo_mcp-0.6.12.dist-info → hanzo_mcp-0.7.0.dist-info}/entry_points.txt +1 -0
  109. hanzo_mcp/tools/common/palette.py +0 -344
  110. hanzo_mcp/tools/common/palette_loader.py +0 -108
  111. hanzo_mcp/tools/config/palette_tool.py +0 -179
  112. hanzo_mcp/tools/llm/llm_unified.py +0 -851
  113. hanzo_mcp-0.6.12.dist-info/METADATA +0 -339
  114. hanzo_mcp-0.6.12.dist-info/RECORD +0 -135
  115. hanzo_mcp-0.6.12.dist-info/licenses/LICENSE +0 -21
  116. {hanzo_mcp-0.6.12.dist-info → hanzo_mcp-0.7.0.dist-info}/WHEEL +0 -0
  117. {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()