hanzo-mcp 0.9.0__tar.gz → 0.9.2__tar.gz
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-0.9.0 → hanzo_mcp-0.9.2}/PKG-INFO +1 -1
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/__init__.py +1 -1
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/analytics/posthog_analytics.py +14 -1
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/cli.py +108 -4
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/server.py +11 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/__init__.py +3 -16
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/__init__.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/agent.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/agent_tool.py +3 -17
- hanzo_mcp-0.9.2/hanzo_mcp/tools/agent/agent_tool_v1_deprecated.py +623 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/clarification_tool.py +7 -1
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/claude_desktop_auth.py +16 -6
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/cli_agent_base.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/cli_tools.py +26 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/code_auth_tool.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/critic_tool.py +7 -1
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/iching_tool.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/network_tool.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/review_tool.py +7 -1
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/swarm_alias.py +5 -0
- hanzo_mcp-0.9.2/hanzo_mcp/tools/agent/swarm_tool.py +701 -0
- hanzo_mcp-0.9.2/hanzo_mcp/tools/agent/swarm_tool_v1_deprecated.py +554 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/unified_cli_tools.py +5 -0
- hanzo_mcp-0.9.2/hanzo_mcp/tools/common/auto_timeout.py +254 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/base.py +4 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/batch_tool.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/config_tool.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/critic_tool.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/paginated_base.py +4 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/permissions.py +38 -12
- hanzo_mcp-0.9.2/hanzo_mcp/tools/common/personality.py +959 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/stats.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/thinking_tool.py +5 -0
- hanzo_mcp-0.9.2/hanzo_mcp/tools/common/timeout_parser.py +103 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/tool_disable.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/tool_enable.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/tool_list.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/config/config_tool.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/config/mode_tool.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/database/graph.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/database/graph_add.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/database/graph_query.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/database/graph_remove.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/database/graph_search.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/database/graph_stats.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/database/sql.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/database/sql_query.py +2 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/database/sql_search.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/database/sql_stats.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/editor/neovim_command.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/editor/neovim_edit.py +7 -2
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/editor/neovim_session.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/filesystem/__init__.py +23 -26
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/filesystem/ast_tool.py +3 -4
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/filesystem/base.py +2 -18
- hanzo_mcp-0.9.2/hanzo_mcp/tools/filesystem/batch_search.py +825 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/filesystem/content_replace.py +5 -3
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/filesystem/diff.py +5 -0
- hanzo_mcp-0.9.2/hanzo_mcp/tools/filesystem/directory_tree.py +302 -0
- hanzo_mcp-0.9.2/hanzo_mcp/tools/filesystem/directory_tree_paginated.py +345 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/filesystem/edit.py +6 -5
- hanzo_mcp-0.9.2/hanzo_mcp/tools/filesystem/find.py +536 -0
- hanzo_mcp-0.9.2/hanzo_mcp/tools/filesystem/find_files.py +370 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/filesystem/git_search.py +5 -3
- hanzo_mcp-0.9.2/hanzo_mcp/tools/filesystem/grep.py +454 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/filesystem/multi_edit.py +6 -5
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/filesystem/read.py +10 -9
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/filesystem/rules_tool.py +6 -4
- hanzo_mcp-0.9.2/hanzo_mcp/tools/filesystem/search_tool.py +728 -0
- hanzo_mcp-0.9.2/hanzo_mcp/tools/filesystem/symbols_tool.py +510 -0
- hanzo_mcp-0.9.2/hanzo_mcp/tools/filesystem/tree.py +273 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/filesystem/watch.py +6 -1
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/filesystem/write.py +13 -7
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/jupyter/jupyter.py +30 -2
- hanzo_mcp-0.9.2/hanzo_mcp/tools/jupyter/notebook_edit.py +298 -0
- hanzo_mcp-0.9.2/hanzo_mcp/tools/jupyter/notebook_read.py +148 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/llm/consensus_tool.py +8 -6
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/llm/llm_manage.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/llm/llm_tool.py +2 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/llm/llm_unified.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/llm/provider_tools.py +5 -0
- hanzo_mcp-0.9.2/hanzo_mcp/tools/lsp/lsp_tool.py +590 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/mcp/mcp_add.py +7 -2
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/mcp/mcp_remove.py +15 -2
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/mcp/mcp_stats.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/mcp/mcp_tool.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/memory/knowledge_tools.py +14 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/memory/memory_tools.py +17 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/search/find_tool.py +5 -3
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/search/unified_search.py +3 -1
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/__init__.py +2 -14
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/base_process.py +4 -2
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/bash_tool.py +2 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/command_executor.py +7 -7
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/logs.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/npx.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/npx_background.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/npx_tool.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/open.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/pkill.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/process_tool.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/processes.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/run_background.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/run_command.py +2 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/run_command_windows.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/streaming_command.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/uvx.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/uvx_background.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/uvx_tool.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/zsh_tool.py +3 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/todo/todo.py +5 -0
- hanzo_mcp-0.9.2/hanzo_mcp/tools/todo/todo_read.py +142 -0
- hanzo_mcp-0.9.2/hanzo_mcp/tools/todo/todo_write.py +367 -0
- hanzo_mcp-0.9.2/hanzo_mcp/tools/vector/__init__.py +114 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/vector/index_tool.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/vector/vector.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/vector/vector_index.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/vector/vector_search.py +5 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp.egg-info/PKG-INFO +1 -1
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp.egg-info/SOURCES.txt +16 -15
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/pyproject.toml +1 -1
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_e2e_simple.py +8 -8
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_search_quality.py +4 -4
- hanzo_mcp-0.9.0/hanzo_mcp/tools/common/path_utils.py +0 -34
- hanzo_mcp-0.9.0/hanzo_mcp/tools/common/personality.py +0 -1266
- hanzo_mcp-0.9.0/hanzo_mcp/tools/compiler/__init__.py +0 -8
- hanzo_mcp-0.9.0/hanzo_mcp/tools/compiler/sandboxed_compiler.py +0 -681
- hanzo_mcp-0.9.0/hanzo_mcp/tools/environment/__init__.py +0 -8
- hanzo_mcp-0.9.0/hanzo_mcp/tools/environment/environment_detector.py +0 -594
- hanzo_mcp-0.9.0/hanzo_mcp/tools/filesystem/directory_tree.py +0 -549
- hanzo_mcp-0.9.0/hanzo_mcp/tools/filesystem/find.py +0 -670
- hanzo_mcp-0.9.0/hanzo_mcp/tools/filesystem/search.py +0 -1160
- hanzo_mcp-0.9.0/hanzo_mcp/tools/framework/__init__.py +0 -8
- hanzo_mcp-0.9.0/hanzo_mcp/tools/framework/framework_modes.py +0 -714
- hanzo_mcp-0.9.0/hanzo_mcp/tools/lsp/lsp_tool.py +0 -737
- hanzo_mcp-0.9.0/hanzo_mcp/tools/memory/conversation_memory.py +0 -636
- hanzo_mcp-0.9.0/hanzo_mcp/tools/shell/run_tool.py +0 -56
- hanzo_mcp-0.9.0/hanzo_mcp/tools/vector/__init__.py +0 -167
- hanzo_mcp-0.9.0/hanzo_mcp/tools/vector/node_tool.py +0 -538
- hanzo_mcp-0.9.0/hanzo_mcp/tools/vector/unified_vector.py +0 -384
- hanzo_mcp-0.9.0/tests/test_enhanced_features.py +0 -510
- hanzo_mcp-0.9.0/tests/test_path_expansion.py +0 -216
- hanzo_mcp-0.9.0/tests/test_unified_path_expansion.py +0 -301
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/README.md +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/__main__.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/analytics/__init__.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/bridge.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/cli_enhanced.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/cli_plugin.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/compute_nodes.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/config/__init__.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/config/settings.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/config/tool_config.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/core/base_agent.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/core/model_registry.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/dev_server.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/prompts/__init__.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/prompts/compact_conversation.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/prompts/create_release.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/prompts/enhanced_prompts.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/prompts/example_custom_prompt.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/prompts/project_system.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/prompts/project_todo_reminder.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/prompts/tool_explorer.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/prompts/utils.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/server_enhanced.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/clarification_protocol.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/claude_cli_tool.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/code_auth.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/codex_cli_tool.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/gemini_cli_tool.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/grok_cli_tool.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/prompt.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/agent/tool_adapter.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/__init__.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/context.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/context_fix.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/decorators.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/enhanced_base.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/fastmcp_pagination.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/forgiving_edit.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/mode.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/mode_loader.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/paginated_response.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/pagination.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/plugin_loader.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/test_helpers.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/truncate.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/common/validation.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/config/__init__.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/config/index_config.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/database/__init__.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/database/database_manager.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/editor/__init__.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/filesystem/ast_multi_edit.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/filesystem/unix_aliases.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/jupyter/__init__.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/jupyter/base.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/llm/__init__.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/lsp/__init__.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/mcp/__init__.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/memory/__init__.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/search/__init__.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/auto_background.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/base.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/bash_session.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/bash_session_executor.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/session_manager.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/shell/session_storage.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/todo/__init__.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/todo/base.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/vector/ast_analyzer.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/vector/git_ingester.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/vector/infinity_store.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/vector/mock_infinity.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/tools/vector/project_manager.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp/types.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp.egg-info/dependency_links.txt +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp.egg-info/entry_points.txt +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp.egg-info/requires.txt +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/hanzo_mcp.egg-info/top_level.txt +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/setup.cfg +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_agent_tools_ci.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_async_support.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_batch_tool_edge_cases.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_cli.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_cli_agents_consolidated.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_cli_tools.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_e2e_demo.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_failure_cases.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_find_tool_ffind.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_find_tool_integration.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_find_tool_registration.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_git_ingestion.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_hanzo_agents_integration.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_hanzo_mcp_integration.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_hanzo_mcp_local.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_hanzo_mcp_simple.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_hanzo_network_integration.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_litellm_warnings.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_lsp_tool.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_manual.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_memory_base.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_memory_basic.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_memory_consolidated.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_memory_simple.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_memory_utils.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_new_tools.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_no_stubs.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_performance.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_search.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_shell_features.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_shell_tools.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_simple.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_stdio_protocol.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_stdio_simple.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_streaming_command.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_swarm_simple.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_tools_suite.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_unified_search.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_utils.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_vector_store.py +0 -0
- {hanzo_mcp-0.9.0 → hanzo_mcp-0.9.2}/tests/test_web3_integration.py +0 -0
|
@@ -16,6 +16,7 @@ import traceback
|
|
|
16
16
|
from typing import Any, Dict, TypeVar, Callable, Optional
|
|
17
17
|
from datetime import datetime
|
|
18
18
|
from dataclasses import dataclass
|
|
19
|
+
from importlib.metadata import version, PackageNotFoundError
|
|
19
20
|
|
|
20
21
|
# Try to import PostHog, but make it optional
|
|
21
22
|
try:
|
|
@@ -98,7 +99,7 @@ class Analytics:
|
|
|
98
99
|
"timestamp": datetime.utcnow().isoformat(),
|
|
99
100
|
"platform": platform.system(),
|
|
100
101
|
"python_version": platform.python_version(),
|
|
101
|
-
"mcp_version":
|
|
102
|
+
"mcp_version": self._get_package_version(),
|
|
102
103
|
**(properties or {}),
|
|
103
104
|
}
|
|
104
105
|
|
|
@@ -179,6 +180,18 @@ class Analytics:
|
|
|
179
180
|
except Exception:
|
|
180
181
|
pass
|
|
181
182
|
|
|
183
|
+
def _get_package_version(self) -> str:
|
|
184
|
+
"""Get the current package version."""
|
|
185
|
+
try:
|
|
186
|
+
return version('hanzo-mcp')
|
|
187
|
+
except PackageNotFoundError:
|
|
188
|
+
# Fallback to hardcoded version if package not installed
|
|
189
|
+
try:
|
|
190
|
+
from hanzo_mcp import __version__
|
|
191
|
+
return __version__
|
|
192
|
+
except ImportError:
|
|
193
|
+
return "0.8.14"
|
|
194
|
+
|
|
182
195
|
def shutdown(self) -> None:
|
|
183
196
|
"""Shutdown analytics client."""
|
|
184
197
|
if self.is_enabled():
|
|
@@ -15,6 +15,19 @@ import argparse
|
|
|
15
15
|
from typing import Any, cast
|
|
16
16
|
from pathlib import Path
|
|
17
17
|
|
|
18
|
+
# Import timeout parser (deferred to avoid early imports)
|
|
19
|
+
def _parse_timeout_arg(timeout_str: str) -> float:
|
|
20
|
+
"""Parse timeout argument with human-readable format support."""
|
|
21
|
+
try:
|
|
22
|
+
from hanzo_mcp.tools.common.timeout_parser import parse_timeout
|
|
23
|
+
return parse_timeout(timeout_str)
|
|
24
|
+
except ImportError:
|
|
25
|
+
# Fallback if parser not available
|
|
26
|
+
try:
|
|
27
|
+
return float(timeout_str)
|
|
28
|
+
except ValueError:
|
|
29
|
+
raise ValueError(f"Invalid timeout format: '{timeout_str}'")
|
|
30
|
+
|
|
18
31
|
|
|
19
32
|
def main() -> None:
|
|
20
33
|
"""Run the CLI for the Hanzo AI server."""
|
|
@@ -150,9 +163,37 @@ def main() -> None:
|
|
|
150
163
|
_ = parser.add_argument(
|
|
151
164
|
"--command-timeout",
|
|
152
165
|
dest="command_timeout",
|
|
153
|
-
type=
|
|
154
|
-
default=
|
|
155
|
-
help="Default timeout for command execution
|
|
166
|
+
type=str,
|
|
167
|
+
default="120s",
|
|
168
|
+
help="Default timeout for command execution (default: 120s). Supports: 2min, 5m, 120s, 30sec, 1.5h",
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
_ = parser.add_argument(
|
|
172
|
+
"--timeout", "-t",
|
|
173
|
+
dest="tool_timeout",
|
|
174
|
+
type=str,
|
|
175
|
+
help="Default timeout for MCP tool operations (default: 2min). Supports: 2min, 5m, 120s, 30sec, 1.5h",
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
_ = parser.add_argument(
|
|
179
|
+
"--search-timeout",
|
|
180
|
+
dest="search_timeout",
|
|
181
|
+
type=str,
|
|
182
|
+
help="Timeout specifically for search operations. Supports: 2min, 5m, 120s, 30sec, 1.5h",
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
_ = parser.add_argument(
|
|
186
|
+
"--find-timeout",
|
|
187
|
+
dest="find_timeout",
|
|
188
|
+
type=str,
|
|
189
|
+
help="Timeout specifically for find operations. Supports: 2min, 5m, 120s, 30sec, 1.5h",
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
_ = parser.add_argument(
|
|
193
|
+
"--ast-timeout",
|
|
194
|
+
dest="ast_timeout",
|
|
195
|
+
type=str,
|
|
196
|
+
help="Timeout specifically for AST operations. Supports: 2min, 5m, 120s, 30sec, 1.5h",
|
|
156
197
|
)
|
|
157
198
|
|
|
158
199
|
_ = parser.add_argument(
|
|
@@ -206,6 +247,27 @@ def main() -> None:
|
|
|
206
247
|
help="Run in development mode with hot reload",
|
|
207
248
|
)
|
|
208
249
|
|
|
250
|
+
_ = parser.add_argument(
|
|
251
|
+
"--daemon",
|
|
252
|
+
action="store_true",
|
|
253
|
+
help="Run as daemon process for multiple agent connections",
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
_ = parser.add_argument(
|
|
257
|
+
"--socket-path",
|
|
258
|
+
dest="socket_path",
|
|
259
|
+
default="/tmp/hanzo-mcp.sock",
|
|
260
|
+
help="Unix socket path for daemon mode (default: /tmp/hanzo-mcp.sock)",
|
|
261
|
+
)
|
|
262
|
+
|
|
263
|
+
_ = parser.add_argument(
|
|
264
|
+
"--max-connections",
|
|
265
|
+
dest="max_connections",
|
|
266
|
+
type=int,
|
|
267
|
+
default=100,
|
|
268
|
+
help="Maximum number of concurrent connections in daemon mode (default: 100)",
|
|
269
|
+
)
|
|
270
|
+
|
|
209
271
|
_ = parser.add_argument(
|
|
210
272
|
"--install",
|
|
211
273
|
action="store_true",
|
|
@@ -222,10 +284,33 @@ def main() -> None:
|
|
|
222
284
|
pass
|
|
223
285
|
sys.stdout = original_stdout
|
|
224
286
|
|
|
287
|
+
# Parse timeout arguments with human-readable format support
|
|
288
|
+
command_timeout = _parse_timeout_arg(str(args.command_timeout))
|
|
289
|
+
|
|
290
|
+
# Set timeout environment variables from CLI args
|
|
291
|
+
if hasattr(args, 'tool_timeout') and args.tool_timeout:
|
|
292
|
+
tool_timeout = _parse_timeout_arg(args.tool_timeout)
|
|
293
|
+
os.environ["HANZO_MCP_TOOL_TIMEOUT"] = str(tool_timeout)
|
|
294
|
+
|
|
295
|
+
if hasattr(args, 'search_timeout') and args.search_timeout:
|
|
296
|
+
search_timeout = _parse_timeout_arg(args.search_timeout)
|
|
297
|
+
os.environ["HANZO_MCP_SEARCH_TIMEOUT"] = str(search_timeout)
|
|
298
|
+
|
|
299
|
+
if hasattr(args, 'find_timeout') and args.find_timeout:
|
|
300
|
+
find_timeout = _parse_timeout_arg(args.find_timeout)
|
|
301
|
+
os.environ["HANZO_MCP_FIND_TIMEOUT"] = str(find_timeout)
|
|
302
|
+
|
|
303
|
+
if hasattr(args, 'ast_timeout') and args.ast_timeout:
|
|
304
|
+
ast_timeout = _parse_timeout_arg(args.ast_timeout)
|
|
305
|
+
os.environ["HANZO_MCP_AST_TIMEOUT"] = str(ast_timeout)
|
|
306
|
+
|
|
225
307
|
# Cast args attributes to appropriate types to avoid 'Any' warnings
|
|
226
308
|
name: str = cast(str, args.name)
|
|
227
309
|
install: bool = cast(bool, args.install)
|
|
228
310
|
dev: bool = cast(bool, args.dev)
|
|
311
|
+
daemon: bool = cast(bool, args.daemon)
|
|
312
|
+
socket_path: str = cast(str, args.socket_path)
|
|
313
|
+
max_connections: int = cast(int, args.max_connections)
|
|
229
314
|
transport: str = cast(str, args.transport)
|
|
230
315
|
agent_model: str | None = cast(str | None, args.agent_model)
|
|
231
316
|
agent_max_tokens: int | None = cast(int | None, args.agent_max_tokens)
|
|
@@ -234,7 +319,6 @@ def main() -> None:
|
|
|
234
319
|
agent_max_iterations: int = cast(int, args.agent_max_iterations)
|
|
235
320
|
agent_max_tool_uses: int = cast(int, args.agent_max_tool_uses)
|
|
236
321
|
enable_agent_tool: bool = cast(bool, args.enable_agent_tool)
|
|
237
|
-
command_timeout: float = cast(float, args.command_timeout)
|
|
238
322
|
disable_write_tools: bool = cast(bool, args.disable_write_tools)
|
|
239
323
|
disable_search_tools: bool = cast(bool, args.disable_search_tools)
|
|
240
324
|
host: str = cast(str, args.host)
|
|
@@ -285,6 +369,26 @@ def main() -> None:
|
|
|
285
369
|
if not allowed_paths:
|
|
286
370
|
allowed_paths = [os.path.expanduser("~")]
|
|
287
371
|
|
|
372
|
+
# Set daemon mode environment variables
|
|
373
|
+
if daemon:
|
|
374
|
+
os.environ["HANZO_MCP_DAEMON"] = "true"
|
|
375
|
+
os.environ["HANZO_MCP_SOCKET_PATH"] = socket_path
|
|
376
|
+
os.environ["HANZO_MCP_MAX_CONNECTIONS"] = str(max_connections)
|
|
377
|
+
|
|
378
|
+
if transport != "stdio":
|
|
379
|
+
logger.info(f"Starting Hanzo MCP daemon on {socket_path}")
|
|
380
|
+
logger.info(f"Max connections: {max_connections}")
|
|
381
|
+
|
|
382
|
+
# Ensure only one daemon runs per socket
|
|
383
|
+
try:
|
|
384
|
+
import fcntl
|
|
385
|
+
lock_file = f"{socket_path}.lock"
|
|
386
|
+
with open(lock_file, 'w') as f:
|
|
387
|
+
fcntl.flock(f.fileno(), fcntl.LOCK_EX | fcntl.LOCK_NB)
|
|
388
|
+
except (ImportError, IOError):
|
|
389
|
+
# Fallback for systems without fcntl or if lock fails
|
|
390
|
+
pass
|
|
391
|
+
|
|
288
392
|
# Run in dev mode if requested
|
|
289
393
|
if dev:
|
|
290
394
|
from hanzo_mcp.dev_server import DevServer
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import os
|
|
4
4
|
import atexit
|
|
5
5
|
import signal
|
|
6
|
+
import secrets
|
|
6
7
|
import logging
|
|
7
8
|
import warnings
|
|
8
9
|
import threading
|
|
@@ -53,6 +54,7 @@ class HanzoMCPServer:
|
|
|
53
54
|
port: int = 8888,
|
|
54
55
|
enabled_tools: dict[str, bool] | None = None,
|
|
55
56
|
disabled_tools: list[str] | None = None,
|
|
57
|
+
auth_token: str | None = None,
|
|
56
58
|
):
|
|
57
59
|
"""Initialize the Hanzo AI server.
|
|
58
60
|
|
|
@@ -80,6 +82,15 @@ class HanzoMCPServer:
|
|
|
80
82
|
# Use enhanced server for automatic context normalization
|
|
81
83
|
self.mcp = mcp_instance if mcp_instance is not None else EnhancedFastMCP(name)
|
|
82
84
|
|
|
85
|
+
# Initialize authentication token
|
|
86
|
+
self.auth_token = auth_token or os.environ.get('HANZO_MCP_TOKEN')
|
|
87
|
+
if not self.auth_token:
|
|
88
|
+
# Generate a secure random token if none provided
|
|
89
|
+
self.auth_token = secrets.token_urlsafe(32)
|
|
90
|
+
logger = logging.getLogger(__name__)
|
|
91
|
+
logger.warning(f"No auth token provided. Generated token: {self.auth_token}")
|
|
92
|
+
logger.warning("Set HANZO_MCP_TOKEN environment variable for persistent auth")
|
|
93
|
+
|
|
83
94
|
# Initialize permissions and command executor
|
|
84
95
|
self.permission_manager = PermissionManager()
|
|
85
96
|
|
|
@@ -226,22 +226,9 @@ def register_all_tools(
|
|
|
226
226
|
for tool in jupyter_tools:
|
|
227
227
|
all_tools[tool.name] = tool
|
|
228
228
|
|
|
229
|
-
# Register shell tools
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
"shell": is_tool_enabled("shell", True),
|
|
233
|
-
"bash": is_tool_enabled("bash", True),
|
|
234
|
-
"zsh": is_tool_enabled("zsh", True),
|
|
235
|
-
"npx": is_tool_enabled("npx", True),
|
|
236
|
-
"uvx": is_tool_enabled("uvx", True),
|
|
237
|
-
"process": is_tool_enabled("process", True),
|
|
238
|
-
"open": is_tool_enabled("open", True),
|
|
239
|
-
# Legacy name support
|
|
240
|
-
"run_command": is_tool_enabled("run_command", True),
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
if any(shell_enabled.values()):
|
|
244
|
-
shell_tools = register_shell_tools(mcp_server, permission_manager, enabled_tools=shell_enabled)
|
|
229
|
+
# Register shell tools if enabled
|
|
230
|
+
if is_tool_enabled("run_command", True):
|
|
231
|
+
shell_tools = register_shell_tools(mcp_server, permission_manager)
|
|
245
232
|
for tool in shell_tools:
|
|
246
233
|
all_tools[tool.name] = tool
|
|
247
234
|
|
|
@@ -6,6 +6,8 @@ enabling concurrent execution of multiple operations and specialized processing.
|
|
|
6
6
|
|
|
7
7
|
from mcp.server import FastMCP
|
|
8
8
|
|
|
9
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
10
|
+
|
|
9
11
|
from hanzo_mcp.tools.common.base import BaseTool, ToolRegistry
|
|
10
12
|
|
|
11
13
|
# Import unified CLI tools (single source of truth)
|
|
@@ -78,6 +80,9 @@ def register_agent_tools(
|
|
|
78
80
|
def __init__(self, agent_tool: AgentTool):
|
|
79
81
|
self._agent = agent_tool
|
|
80
82
|
|
|
83
|
+
@auto_timeout("__init__")
|
|
84
|
+
|
|
85
|
+
|
|
81
86
|
async def call(self, ctx, **params): # type: ignore[override]
|
|
82
87
|
# Default to 5 agents unless explicitly provided
|
|
83
88
|
params = dict(params)
|
|
@@ -30,6 +30,8 @@ from pydantic import Field
|
|
|
30
30
|
from openai.types.chat import ChatCompletionMessageParam
|
|
31
31
|
from mcp.server.fastmcp import Context as MCPContext
|
|
32
32
|
|
|
33
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
34
|
+
|
|
33
35
|
from hanzo_mcp.tools.jupyter import get_read_only_jupyter_tools
|
|
34
36
|
from hanzo_mcp.tools.filesystem import get_read_only_filesystem_tools
|
|
35
37
|
from hanzo_mcp.tools.common.base import BaseTool
|
|
@@ -212,6 +214,9 @@ Modes:
|
|
|
212
214
|
- rpc: Long-running agent for multiple calls (A2A support)"""
|
|
213
215
|
|
|
214
216
|
@override
|
|
217
|
+
@auto_timeout("agent")
|
|
218
|
+
|
|
219
|
+
|
|
215
220
|
async def call(
|
|
216
221
|
self,
|
|
217
222
|
ctx: MCPContext,
|
|
@@ -20,6 +20,8 @@ from typing import (
|
|
|
20
20
|
from mcp.server import FastMCP
|
|
21
21
|
from mcp.server.fastmcp import Context as MCPContext
|
|
22
22
|
|
|
23
|
+
from hanzo_mcp.tools.common.auto_timeout import auto_timeout
|
|
24
|
+
|
|
23
25
|
# Import hanzo-agents SDK
|
|
24
26
|
try:
|
|
25
27
|
from hanzo_agents import (
|
|
@@ -103,23 +105,6 @@ from hanzo_mcp.tools.agent.clarification_protocol import (
|
|
|
103
105
|
|
|
104
106
|
|
|
105
107
|
class AgentToolParams(TypedDict, total=False):
|
|
106
|
-
|
|
107
|
-
def __init__(self, *args, mode: str = "single", **kwargs):
|
|
108
|
-
"""Initialize agent tool with mode support.
|
|
109
|
-
|
|
110
|
-
Modes:
|
|
111
|
-
- single: Single agent execution (default)
|
|
112
|
-
- network: Network of agents (formerly swarm)
|
|
113
|
-
- dispatch: Dispatch to best agent (legacy compatibility)
|
|
114
|
-
"""
|
|
115
|
-
super().__init__(*args, **kwargs)
|
|
116
|
-
self.mode = mode
|
|
117
|
-
|
|
118
|
-
# Handle legacy names
|
|
119
|
-
if self.name == "dispatch_agent":
|
|
120
|
-
self.mode = "dispatch"
|
|
121
|
-
elif self.name in ["network", "swarm"]:
|
|
122
|
-
self.mode = "network"
|
|
123
108
|
"""Parameters for the AgentTool."""
|
|
124
109
|
|
|
125
110
|
prompts: str | list[str]
|
|
@@ -355,6 +340,7 @@ Usage notes:
|
|
|
355
340
|
self.available_tools.append(BatchTool({t.name: t for t in self.available_tools}))
|
|
356
341
|
|
|
357
342
|
@override
|
|
343
|
+
@auto_timeout("agent")
|
|
358
344
|
async def call(
|
|
359
345
|
self,
|
|
360
346
|
ctx: MCPContext,
|