15 Commits
Author SHA1 Message Date
zeekay 1143769c59 fix(lint): fix import sorting and lru_cache noqa
- Fix 12 import sorting issues (I001)
- Add noqa for lru_cache in shellflow.py (TID251 rule for Stainless SDK)
2025-12-27 20:32:45 -08:00
zeekay 6998188dea style: format test files with black 2025-12-27 15:00:11 -08:00
zeekay ec7eabd9fc test: add basic test suites for all 18 hanzo-tools-* packages 2025-12-27 14:57:15 -08:00
zeekay a9769ebb28 refactor: merge hanzo-tools-core into hanzo-tools
- hanzo-tools now contains core infrastructure (BaseTool, ToolRegistry, etc.)
- hanzo-tools-core becomes a thin backwards-compat wrapper
- All tool packages now depend on hanzo-tools>=0.3.0
- Reduces package count and simplifies dependency tree
2025-12-26 16:53:58 -08:00
zeekay 00c8bf1994 refactor: rename hanzo-metastable-consensus to hanzo-consensus
Simplified package naming for clarity.
2025-12-26 16:42:52 -08:00
zeekay a46a541db1 feat(llm): use hanzo-metastable-consensus for consensus tool
- Replace litellm aggregation with Metastable protocol
- Two-phase finality: Sampling + Finality
- Reference: https://github.com/luxfi/consensus
2025-12-26 16:39:01 -08:00
zeekay 5a1c976535 feat: consolidate tools - 52 to 30 tools
Major consolidation of hanzo-mcp tools:

Memory (9 → 1 tool):
- Unified UnifiedMemoryTool with actions: recall, create, update, delete,
  manage, facts, store, summarize, kb

Agent (10+ → 3 tools):
- Unified UnifiedAgentTool for claude, codex, gemini, grok CLI agents
- Removed duplicate critic (use reasoning.critic instead)
- Kept iching and review tools
- Removed code_auth, network, request_clarification

LLM (3 → 2 tools):
- Removed llm_manage (consolidated into llm)

Tool Management (4 → 1 tool):
- Existing unified `tool` command handles install, enable, disable, list

Essential Tools:
- Added memory, shell, open, tool to ESSENTIAL_TOOLS
- Added memory to ESSENTIAL_SYSTEM_TOOLS (always enabled)
- Updated hanzo mode with iching, review, computer

Bug fixes:
- Fixed async await warning in dag_tool.py
- Fixed duplicate critic conflict between agent and reasoning
2025-12-26 11:43:19 -08:00
zeekay 2cb7eb03fc feat(hanzo-mcp): unified tool command and essential tools system
Major improvements to mode and tool management:

1. Essential System Tools - Critical tools (llm, consensus, config, mode,
   tool, version, stats) are now ALWAYS enabled regardless of active mode.
   Previously, mode system disabled all tools then only enabled mode-specific
   ones, causing critical tools to be unavailable.

2. Unified 'tool' Command - Consolidates tool_install, tool_enable,
   tool_disable, tool_list into single 'tool' command with actions:
   - list: List all tools by category
   - enable/disable: Toggle tool state
   - install/uninstall: Package management
   - upgrade/reload: Update tools
   - self_update: Update hanzo-mcp

3. Fixed Permission Manager - Made permission_manager optional in:
   - FileSystemTool base class
   - ComputerTool
   - ConfigTool
   - ReadTool, WriteTool, EditTool
   Now creates default PermissionManager if not provided.

4. Fixed Mode System - Builtin modes (hanzo, minimal, fullstack, devops,
   security) are now always registered alongside hanzo-persona profiles.
   Previously they were skipped when hanzo-persona was available.

5. Updated ESSENTIAL_TOOLS constant with modern tool names and added
   llm, consensus, config, mode to ensure they're in all default modes.

Version bump: 0.10.19 -> 0.10.20
2025-12-26 11:09:45 -08:00
zeekay c6f8162b8c chore: publish hanzo-tools-{config,llm,mcp,vector} and meta package 0.2.0 2025-12-26 10:30:14 -08:00
zeekay 2d1bdd997f refactor: cleanup and consolidate tool packages
- Delete deprecated files (agent_tool_v1_deprecated.py, swarm_tool_v1_deprecated.py)
- Consolidate duplicate LLM tools (merge llm_tool.py into llm_unified.py)
- Rename agent CriticTool to CodeReviewTool to avoid conflict with reasoning critic
- Fix stub classes in swarm_tool.py to raise ImportError instead of silent pass
- Update CLAUDE.md with accurate tool counts (62 tools across 17 packages)
2025-12-26 05:05:41 -08:00
zeekay c825db98e5 chore: run ruff format on all hanzo packages 2025-12-26 04:12:26 -08:00
zeekay a3b58c011f chore: fix ruff linting issues across all hanzo-tools packages
- Fix import sorting (I001) in all packages
- Fix bare except (E722) in lsp_tool.py
- Fix duplicate set item (B033) in refactor_tool.py
2025-12-26 04:11:10 -08:00
zeekay e346468d08 docs(hanzo-tools): add README files for new packages
- hanzo-tools-config: config, mode tools
- hanzo-tools-mcp: mcp management tools
- hanzo-tools-llm: LLM interaction tools
- hanzo-tools-vector: vector search tools
2025-12-26 03:59:54 -08:00
zeekay c32eef2fa0 feat(hanzo-tools): complete modular tool packages v0.10.7
- Add hanzo-tools-llm (4 tools: llm, unified_llm, consensus, llm_manage)
- Add hanzo-tools-vector (3 tools: index, vector_index, vector_search)
- Add hanzo-tools-config (2 tools: config, mode)
- Add hanzo-tools-mcp (4 tools: mcp, mcp_add, mcp_remove, mcp_stats)
- Update hanzo-tools meta package with all 17 packages
- Bump hanzo-mcp to v0.10.7

Total: 63 tools across 17 modular packages

Bundle extras:
- [core]: filesystem, shell, todo, reasoning, config
- [dev]: core + editor, lsp, refactor
- [ai]: llm, agent, memory
- [all]: everything
2025-12-26 03:51:15 -08:00
zeekay d5f8e3f2b5 feat(hanzo-tools): add modular tool packages with 53 tools across 13 packages
Introduces hanzo-tools-* namespace packages for independent tool installation:

Core packages:
- hanzo-tools-core: BaseTool, ToolRegistry, PermissionManager
- hanzo-tools-filesystem: read, write, edit, tree, find, search, ast (7 tools)
- hanzo-tools-shell: dag, ps, zsh, shell, npx, uvx, open (7 tools)

AI/Agent packages:
- hanzo-tools-agent: critic, iching, review, network, CLI agents (12 tools)
- hanzo-tools-memory: recall/create/update/delete memories, facts, KB (9 tools)
- hanzo-tools-reasoning: think, critic (2 tools)

Editor/Dev packages:
- hanzo-tools-lsp: Language Server Protocol tool (1 tool)
- hanzo-tools-refactor: rename, extract, inline, move, change_signature (1 tool)
- hanzo-tools-database: SQL + graph database tools (8 tools)
- hanzo-tools-editor: neovim integration (3 tools)
- hanzo-tools-jupyter: notebook read/edit (1 tool)
- hanzo-tools-browser: Playwright browser automation (1 tool)
- hanzo-tools-todo: unified todo management (1 tool)

Key improvements:
- All subprocess.run calls have timeout protection
- All tool .call() methods are async
- Namespace package pattern for mix-and-match installation
- Entry point discovery via hanzo.tools
- No blocking imports (all < 2s)

Also updates hanzo-mcp:
- Browser tool integration
- Tool install/registry for dynamic tool management
- Auto-background timeout reduced to 60s
2025-12-25 22:38:26 -08:00