Commit Graph
216 Commits
Author SHA1 Message Date
zeekay e8f601ea52 fix(mcp): update tests to use AgentTool instead of UnifiedAgentTool 2025-12-27 15:18:54 -08:00
zeekay b631e1634b fix(core): update memory tool count (1 unified tool, not 9) 2025-12-27 15:13:50 -08:00
zeekay 5b9b968491 fix(core): remove ToolCategory from exports (it's in hanzo-mcp, not hanzo-tools-core) 2025-12-27 15:11:58 -08:00
zeekay d75c6d894e fix(core): import MCPResourceDocument from types.py, not base.py 2025-12-27 15:09:52 -08:00
zeekay 07301d15ac fix(ci): ignore hanzo-tools-core deprecation warning in pytest 2025-12-27 15:08:38 -08:00
zeekay 3edb7eba2d fix(core): filter deprecation warning in tests 2025-12-27 15:07:07 -08:00
zeekay c2aab3f441 fix(core): update test module names and tool counts
- hanzo_tools.filesystem -> hanzo_tools.fs (correct module name)
- shell: 7 -> 11 tools (dag, ps, zsh, bash, shell, npx, uvx, open, curl, jq, wget)
- agent: 10-12 -> 3 tools (AgentTool, IChingTool, ReviewTool)
- Removed variable agent tool count - now exactly 3 tools
- Updated total required tools: 48
2025-12-27 15:05:46 -08:00
zeekay 3eac05a02a style: format test files with black 2025-12-27 15:00:11 -08:00
zeekay 3a6c7e59d5 fix(mcp): lower shell dep to 0.2.0 to unblock CI (PyPI has 0.2.0) 2025-12-27 14:58:29 -08:00
zeekay 39ce396447 test: add basic test suites for all 18 hanzo-tools-* packages 2025-12-27 14:57:15 -08:00
zeekay 128549d29b docs: add READMEs for all 18 hanzo-tools-* packages 2025-12-27 14:55:13 -08:00
zeekay 07c162be93 chore(mcp): bump to 0.10.27, require hanzo-tools-shell>=0.4.1 2025-12-27 14:51:25 -08:00
zeekay 68091d9198 feat(shell): shellflow DSL parser with high-performance optimization
- Add shellflow.py: minimal DSL for DAG execution
  - Syntax: A ; B (sequential), { A & B } (parallel)
  - Compiles to JSON AST, S-expressions, or command list
  - Supports quoted strings, &&, ||, nested braces

- Performance optimizations:
  - Precompiled regex with local variable caching
  - Fast-path for simple/sequential commands (8x faster)
  - LRU cache for repeated patterns
  - Full type annotations for mypyc compilation

- Restore dag as separate semantic tool:
  - dag: for parallel/serial/graph execution
  - zsh: for shell commands with shellflow DSL
  - Both support nested arrays for auto-parallel

- Add comprehensive test suite (53 tests):
  - Tokenizer, parser, normalization tests
  - S-expression and command conversion tests
  - Performance benchmarks
  - Integration tests with real shell execution

Performance: ~7M ops/sec for simple commands,
~220k ops/sec for sequential, ~100k ops/sec for mixed DAGs
2025-12-27 14:44:33 -08:00
zeekay 319fa5b29d docs(shell): update bash/shell tool descriptions with Shellflow syntax 2025-12-27 14:17:48 -08:00
zeekay 40375c8f65 feat(shell): add Shellflow DSL for inline DAG syntax
Shellflow syntax:
  A ; B ; C           → sequential
  { A & B & C }       → parallel
  A ; { B & C } ; D   → mixed

Usage:
  zsh("mkdir dist ; { cp a dist/ & cp b dist/ } ; zip out.zip dist/")

Compiles to JSON AST then executes via DAG.
Bump to v0.4.0
2025-12-27 14:17:04 -08:00
zeekay d73f19104d feat(shell): nested arrays auto-parallel in DAG execution
zsh(["setup", ["a", "b", "c"], "cleanup"])
# Runs: setup → (a, b, c in parallel) → cleanup

Bump hanzo-tools-shell to v0.3.3
2025-12-27 13:34:59 -08:00
zeekay 0ac5c48f31 feat(shell): add bash tool and shell parameter for runtime switching
- Add shell parameter to zsh/bash/shell tools for runtime shell switching
- Add BashTool for bash-specific scripts
- Usage: zsh("cmd", shell="bash") or bash("cmd")
- Bump hanzo-tools-shell to v0.3.2
2025-12-27 13:32:07 -08:00
zeekay 1444bd03a7 refactor(shell): merge dag into zsh for unified shell tool
- ZshTool now includes full DAG functionality (serial, parallel, graph)
- Single "zsh" command for all shell operations
- Usage: zsh("ls") or zsh(["cmd1", "cmd2"]) or zsh([...], parallel=True)
- DagTool kept in codebase for backwards compatibility
- Removed DagTool from default TOOLS list
- Bump hanzo-tools-shell to v0.3.1
2025-12-27 13:09:33 -08:00
zeekay db6ac5e8d9 feat(agent): add direct API mode and auto-backgrounding
- Add _exec_api method for OpenAI/Anthropic-compatible API calls
- Add httpx and uvloop as optional dependencies [api] [perf]
- Auto-background long-running agent processes with ps --logs support
- Configure YOLO mode flags for all CLI agents
- Bump hanzo-tools-agent to v0.2.7, hanzo-mcp to v0.10.26
2025-12-27 13:06:01 -08:00
zeekay 35813e5a59 Bump agent tools 2025-12-27 10:50:15 -08:00
zeekay 567321fa1c refactor: rename hanzo-tools-filesystem to hanzo-tools-fs
- Shorter package name for brevity
- hanzo_tools.filesystem -> hanzo_tools.fs
- Updated all dependencies and CI
2025-12-26 16:56:44 -08:00
zeekay efbac9ba1f 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 faf9efeb24 docs(consensus): document MCP mesh usage 2025-12-26 16:45:04 -08:00
zeekay e9457fb59f feat(consensus): add MCP mesh for agent-to-agent consensus
- MCPMesh: Register agents as MCP servers
- MCPAgent: Call tools on other agents
- run_mcp_consensus: N rounds of discussion via MCP
- create_mesh: Convenience factory

Each agent in consensus is available as MCP to every other.
2025-12-26 16:44:37 -08:00
zeekay b2788b5fba refactor: rename hanzo-metastable-consensus to hanzo-consensus
Simplified package naming for clarity.
2025-12-26 16:42:52 -08:00
zeekay 935e6a253f 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 be8812f79c feat: extract hanzo-metastable-consensus package
- New package: hanzo-metastable-consensus
- Two-phase finality: Sampling + Finality
- Used by hanzo-tools-agent for consensus action
- Reference: https://github.com/luxfi/consensus
2025-12-26 16:20:32 -08:00
zeekay 62be4108a6 feat(agent): multi-agent orchestration with DAG, swarm, Lux Quasar consensus
- Actions: run, dag, swarm, consensus, dispatch, list, status, config
- DAG execution with topological sort and {dep_id} output injection
- Swarm for work distribution with asyncio.Semaphore max_concurrent
- Lux Quasar consensus: Nova DAG + Quasar finality phases
- Photon luminance-weighted peer sampling (faster agents = higher weight)

Native agents: claude, codex, gemini, grok, qwen, vibe, dev

Anthropic-compatible agents (via claude CLI):
- minimax (MiniMax-M2.1)
- kimi (Kimi K2 / Moonshot)
- deepseek (DeepSeek)
- yi (Yi / 01.AI)
- glm (Zhipu GLM-4)
- baichuan (Baichuan4)
- step (StepFun)
- dashscope (Qwen Max via DashScope)
- qwen-cc (Qwen Plus via DashScope)

Consensus: https://github.com/luxfi/consensus
2025-12-26 16:08:35 -08:00
zeekay cb09f9956c refactor(agent): rename Lux Quasar to Metastable consensus 2025-12-26 15:49:42 -08:00
zeekay d88e888e0f feat(agent): one tool with actions, not many tools
Consolidated agent tool with actions:
- run: single agent execution (claude -p default)
- dag: DAG execution with dependencies and {dep_id} injection
- swarm: work distribution with max_concurrent semaphore
- consensus: Lux Quasar protocol (Nova + Quasar phases)
- dispatch: different agents for different tasks

Removed hanzo-agents SDK dependency. Lightweight CLI execution.

Consensus: https://github.com/luxfi/consensus
2025-12-26 15:46:48 -08:00
zeekay 9a2eb6857b chore: bump hanzo-tools-shell to 0.3.0 2025-12-26 13:25:55 -08:00
zeekay 53a46be59f feat(shell): add curl, jq, wget tools for shell escaping-free operations
Add three new shell tools that bypass shell escaping issues by using
subprocess with list arguments instead of shell interpretation:

- curl: HTTP client with proper JSON body handling
- jq: JSON processor with direct filter passing
- wget: File/site downloads with mirror mode support

These tools solve the common problem of shell escaping nightmares
when working with complex JSON or special characters.

Updates:
- Added CurlTool, JqTool, WgetTool to hanzo-tools-shell
- Updated __all__ exports and TOOLS list
- Added tools to entrypoint_loader PACKAGE_TOOL_PREFIXES
2025-12-26 13:25:21 -08:00
zeekay 028a2656ac chore: bump hanzo-mcp to 0.10.22, hanzo-tools-agent to 0.2.1 2025-12-26 12:25:51 -08:00
zeekay d364e8a36f feat(agent): agentic proxy with Claude Code integration
Enhanced agent tool architecture:
- 8 CLI agents: claude, codex, gemini, grok, qwen, vibe, code, dev
- Auto-detects Claude Code environment for seamless auth
- Shares hanzo-mcp config with spawned agents
- Lightweight - no heavy litellm dependency

Essential tools reorganization:
- Added agent, think, critic to essential tools
- Removed llm/consensus from essential (heavy deps, opt-in)
- HEAVY_TOOLS constant for tracking opt-in tools

Config sharing:
- HANZO_AGENT_PARENT=true passed to child agents
- MCP config env vars propagated
- API keys shared when appropriate
2025-12-26 12:25:16 -08:00
zeekay da791ef8f4 fix: update agent tests for unified tools 2025-12-26 12:08:56 -08:00
zeekay f949678bc5 fix: lint and format issues 2025-12-26 12:07:03 -08:00
zeekay 6c5314a343 chore: bump hanzo-mcp to 0.10.21 2025-12-26 11:45:26 -08:00
zeekay 70b877965f 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 10da71bd42 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 7352c29f14 feat(hanzo-mcp): v0.10.18 - add hanzo-tools-* and hanzo-persona as required dependencies 2025-12-26 10:47:00 -08:00
zeekay a1594bebd7 chore: update hanzo-agent submodule 2025-12-26 10:36:26 -08:00
zeekay 2f1778ad7f chore: publish hanzo-tools-{config,llm,mcp,vector} and meta package 0.2.0 2025-12-26 10:30:14 -08:00
zeekay 2190cd902a chore: bump hanzo-tools-* to 0.2.0, hanzo-mcp to 0.10.17
Published all packages to PyPI:
- hanzo-tools-core 0.2.0
- hanzo-tools-filesystem 0.2.0
- hanzo-tools-shell 0.2.0
- hanzo-tools-browser 0.2.0
- hanzo-tools-memory 0.2.0
- hanzo-tools-todo 0.2.0
- hanzo-tools-reasoning 0.2.0
- hanzo-tools-lsp 0.2.0
- hanzo-tools-refactor 0.2.0
- hanzo-tools-database 0.2.0
- hanzo-tools-agent 0.2.0
- hanzo-tools-jupyter 0.2.0
- hanzo-tools-editor 0.2.0
- hanzo-tools-computer 0.2.0
- hanzo-mcp 0.10.17
2025-12-26 06:49:24 -08:00
zeekay bcadbcd035 feat(hanzo-tools-computer): v0.2.0 - comprehensive Mac automation
- Add window management: get_active_window, list_windows, focus_window
- Add screen management: get_screens, screen_size, current_screen
- Add region abstractions: define_region, region_screenshot, region_locate
- Add image utilities: locate_all, wait_for_image, wait_while_image
- Add pixel operations: pixel, pixel_matches with tolerance
- Add timing controls: set_pause, set_failsafe, countdown
- Add input helpers: write (with clear), key_down/key_up, move_relative
- Add batch operations: run multiple actions in one call
- Performance: thread pool executor, cached screen info, faster polling
- All operations non-blocking with async-first design
2025-12-26 06:45:07 -08:00
zeekay 4a966e92d1 feat(hanzo-tools): v0.10.17 - modular tool packages + computer control
- Add hanzo-tools-computer package for pyautogui Mac automation
- Fix hanzo-tools-agent imports to use new package structure
- Add get_read_only_*_tools() helpers to filesystem/jupyter
- Remove BatchTool (replaced by dag - one tool per capability)
- Remove hanzo-persona dependency (not published yet)
- Simplify pyproject.toml for local development

Packages ready for PyPI:
- hanzo-tools-core
- hanzo-tools-filesystem
- hanzo-tools-shell
- hanzo-tools-browser
- hanzo-tools-memory
- hanzo-tools-todo
- hanzo-tools-reasoning
- hanzo-tools-lsp
- hanzo-tools-refactor
- hanzo-tools-database
- hanzo-tools-agent
- hanzo-tools-jupyter
- hanzo-tools-editor
- hanzo-tools-computer (NEW)
2025-12-26 06:37:28 -08:00
zeekay 11bbbc3e24 fix(hanzo-mcp): convert blocking subprocess.run to async
- git_search.py: All 6 subprocess.run calls converted to asyncio.create_subprocess_exec
- search_tool.py: All 6 subprocess.run + 3 blocking file reads converted to async
- npx.py: Converted to asyncio.create_subprocess_exec with proper timeout
- uvx.py: Both subprocess calls converted to async with timeout handling
- open.py: Platform openers converted to async fire-and-forget pattern

All tools now use non-blocking async I/O for better concurrency.
Tests: 31/31 passing.
2025-12-26 05:47:19 -08:00
zeekay b6b5e674e5 fix(tools): cleanup and architecture documentation
- Delete deprecated agent_tool_v1_deprecated.py and swarm_tool_v1_deprecated.py
- Keep CriticTool as name='critic' (not code_review) per user request
- Add missing stub classes for CLI agents when hanzo-agents unavailable
- Fix NameError: ClaudeCodeAgent not defined in tests
- Document hanzo-mcp vs hanzo-tools-* architecture in CLAUDE.md
2025-12-26 05:25:55 -08:00
zeekay aaea73b13f 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 2a5ea7169e chore(hanzo-mcp): bump version to 0.10.9 2025-12-26 04:44:58 -08:00
zeekay e8eb9e2281 fix: run black formatter on pkg/hanzo 2025-12-26 04:37:43 -08:00