84 Commits
Author SHA1 Message Date
zeekay 2940310a5d chore: update sub-package dependencies for security fixes
- Update uv.lock files in all sub-packages
- python-multipart 0.0.21 -> 0.0.22 (arbitrary file write fix)
- urllib3 2.6.1 -> 2.6.3 (decompression-bomb fix)
- Various other dependency updates

Note: docs/package-lock.json has next.js vulnerabilities that need
manual resolution due to npm dependency conflicts.
2026-02-02 22:40:00 -08:00
zeekay 86c2cdcc0d feat: add new tool packages and install command
- Add hanzo-tools-code: code analysis and transformation tools
- Add hanzo-tools-net: network and HTTP tools
- Add hanzo-tools-plan: planning and task management tools
- Add hanzo-tools-test: testing tools
- Add hanzo-tools-vcs: version control tools
- Add install command for dependency management
- Improve CDP bridge server with better error handling
- Add ui_tool for computer tools
- Add unified tool loading and id_tool
- Add HIP documentation (HIP-0300, HIP-0301)
2026-01-24 13:21:16 -08:00
zeekay 2240bd7cbe feat: add cloud CLI commands
New commands for hanzo cloud platform:
- auto, cx, doc, env, events, flow, fn
- growth, iam, install, jobs, k8s, kv
- ml, o11y, platform, pubsub, queues
- run, search, secrets, storage, tasks, vector
2026-01-21 21:45:04 -08:00
zeekay 0a96a9efc4 fix: remove conflicting hanzo-mcp script from hanzo package
The hanzo CLI was exporting a hanzo-mcp command that conflicts with
the dedicated hanzo-mcp package. Removed to allow both to coexist.

Bump version to 0.3.47.
2026-01-21 20:21:57 -08:00
zeekay aa4c02676a refactor: remove all backwards compat aliases from cloud CLI
One canonical way to do everything:
- hanzo cloud <service> create/describe/list/delete/update
- hanzo cloud <service> connect/env/status
- hanzo cloud <service> start/stop/restart (stateful)
- hanzo cloud <service> enable/disable (functions, cron)
- hanzo cloud <service> pause/resume (queues)
- hanzo cloud services list
- hanzo cloud instances list
- hanzo cloud operations list/describe/wait
- hanzo cloud init
2026-01-19 23:59:58 -08:00
zeekay 15943c374d feat: refactor cloud CLI to gcloud idioms
Structure: hanzo cloud <service> <verb>

Canonical verbs:
- list, describe, create, delete, update
- connect, env, status (Hanzo-specific)

Lifecycle verbs (resource-dependent):
- start, stop, restart (stateful services: vector, kv, documentdb, etc.)
- enable, disable (functions, cron)
- pause, resume (queues)

New subgroups:
- hanzo cloud services list (available service types)
- hanzo cloud instances list (provisioned instances)
- hanzo cloud operations list/describe/wait (async tracking)

Aliases for backwards compat:
- ls → list, rm/destroy → delete, get → describe
- provision → create, up → create

Old commands still work with deprecation hints.
2026-01-19 23:54:37 -08:00
zeekay 411d960c0f feat: rename 'hanzo infra' CLI to 'hanzo cloud'
- Renamed infra.py to cloud.py with cloud_group command
- Updated CLI imports and registrations
- Bumped version to 0.3.35
- Updated Python requirement to >=3.12 (for hanzo-aci compatibility)
2026-01-19 23:39:36 -08:00
zeekay c141d110f0 feat: add 'hanzo infra' CLI for cloud infrastructure provisioning
Commands:
- hanzo infra list      - Show available services
- hanzo infra provision - Provision service on Hanzo Cloud
- hanzo infra connect   - Get connection details
- hanzo infra env       - Export environment variables
- hanzo infra status    - Check service health
- hanzo infra destroy   - Delete provisioned service
- hanzo infra init      - Initialize from hanzo.yaml

Services: vector, kv, documentdb, storage, search, pubsub, tasks, queues, cron, functions
2026-01-19 23:28:25 -08:00
zeekay 6de910bea3 refactor: simplify hanzo infra extras (hanzo[vector] instead of hanzo[infra-vector]) 2026-01-19 23:19:28 -08:00
zeekay 6326973161 feat: add hanzo-tools-api package and hanzo.infra SDK
Add generic REST API tool for calling any API via OpenAPI specs:
- 30+ built-in provider configs with env var auto-detection
- 1100+ auto-generated providers from APIs.guru + oapis.org
- Secure credential management with pluggable storage
- OpenAPI spec parsing with ETag caching
- Agent-friendly interface with search, overview, call actions

Add hanzo.infra unified infrastructure SDK:
- Vector (Qdrant), KV (Redis/Valkey), DocumentDB (MongoDB)
- Storage (S3/MinIO), Search (Meilisearch), PubSub (NATS)
- Tasks (Temporal), Queues, Cron, Functions (Nuclio)
- Async clients with lazy initialization and health checks
- Optional deps via [infra-*] extras

Bump hanzo-mcp to v0.11.4 with api tool integration.
2026-01-19 23:00:17 -08:00
zeekay d7ba2569d6 refactor: remove AI slop - mock data, stubs, dead code
- dashboard.py: fetch real data from cluster API instead of fake data
- Shows [DISCONNECTED] with helpful message when cluster unavailable
- Uses HANZO_CLUSTER_URL env var for cluster endpoint
- Fetches agents from hanzoai.agents.list_agents()
2026-01-19 00:17:24 -08:00
zeekay b821c8bfa6 refactor: eliminate all TODOs, placeholders, stubs, and fake data
Comprehensive cleanup across 12 files:

hanzo CLI:
- auth.py: remove dead code, clean up auth flow comments
- mcp.py: clarify CLI context creation
- dev.py: clean up orchestrator comments, implement basic validation
- dashboard.py: remove demo data comments, add sample data label
- enhanced_repl.py: remove sleep simulation in login
- router/__init__.py: clarify fallback behavior

hanzo-repl:
- llm_client.py: implement actual Ollama health check via HTTP
- textual_repl.py: simplify parameter handling, remove TODO

hanzo-tools-agent:
- swarm_tool.py: rename stubs to _RequiresHanzoAgents, clean up
- cli_agent_base.py: clarify temp file substitution
- agent.py: implement _execute_agent using unified_agent_tool

hanzo-tools-database:
- memory_manager.py: implement generate_embedding with fastembed,
  implement vector_search with sqlite-vec

All code now follows: one way to do it, composable, orthogonal, complete
2026-01-19 00:11:11 -08:00
zeekay ffb281d9b8 refactor: remove AI slop - mock data, stubs, dead code
- auth.py: remove dead code after return in SSO section
- agent.py: replace mock list with real registry call
- dashboard.py: add [DEMO] indicator, improve comments
- batch_orchestrator.py: log warnings when no API client
- textual_repl.py: clarify context tracking comment
2026-01-18 20:25:27 -08:00
zeekay 12d4acf619 style(hanzo): format with black 2025-12-27 16:25:51 -08:00
zeekay 303a05a616 feat(agent): agentic proxy with agent integration
Enhanced agent tool architecture:
- 8 CLI agents: claude, codex, gemini, grok, qwen, vibe, code, dev
- Auto-detects agent 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 033e9d26f4 fix: run black formatter on pkg/hanzo 2025-12-26 04:37:43 -08:00
zeekay b21ca3a5ce fix: run ruff check --fix and format across entire codebase 2025-12-26 04:31:06 -08:00
zeekay 9ffef4b460 fix: Format hanzo pkg with black and fix flaky test
- Format pkg/hanzo with black (CI uses black, not ruff)
- Simplify test_agent_tool_no_warnings to test directly in process
  rather than via subprocess, avoiding CI path issues
2025-12-09 15:46:42 -08:00
zeekay 6cea304494 fix: Fix lint and flaky test in CI
- Fix import sort issues in hanzo package (8 I001 violations)
- Make test_agent_tool_no_warnings more robust by only checking for
  pydantic-specific deprecation warnings, not all deprecation warnings
  which may come from unrelated packages in CI environment.
2025-12-09 15:38:56 -08:00
zeekay 56ccb8cff1 fix: Convert test functions to proper pytest format
- Refactor tests in test_workflow.py, test_memory.py, and test_signal_handling.py
  to use assertions instead of returning booleans (pytest strict mode requires None)
- Fix test_batch_orchestrator.py to mock file finding to avoid filesystem scans
- Add 'integration' pytest marker to both root pyproject.toml and pkg/hanzo/pytest.ini
- Account for system memories in memory manager tests
2025-12-09 14:52:53 -08:00
zeekay e102539436 fix: Add error field to BatchTask dataclass for proper exception handling
- Added error field as dataclass attribute instead of property
- Updated success property to handle string results safely with getattr
- Added get_error() method to retrieve error from direct field or result
- Fixes test failures in test_task_failure_handling
2025-12-09 14:40:52 -08:00
zeekay ae17d82677 fix: Clean up SDK, fix pytest-asyncio config, remove summary files
- Remove random summary files (QUICK_REFERENCE.md, GRPO_*.md, etc.)
- Fix pytest-asyncio configuration with asyncio_mode=auto
- Fix async_client fixture with @pytest_asyncio.fixture decorator
- Fix test imports with correct sys.path for hanzo package
- Update hanzo-agent submodule reference
- All 2828+ API tests passing
2025-12-09 09:14:34 -08:00
zeekay 474ccac8a5 feat: Replace hanzo-agents with hanzo-agent submodule
Consolidates agent functionality into unified hanzo-agent SDK:

Changes:
- Removed old pkg/hanzo-agents package (deprecated)
- Added hanzo-agent as git submodule at pkg/hanzo-agent
- Updated pyproject.toml to remove hanzo-agents test exclusion
- Configured .gitmodules for github.com/hanzoai/agent

Benefits:
- Single source of truth for agent functionality
- Modular extensions (web3, tee, marketplace, cli)
- Maintains both standalone and integrated use cases
- Users can install: pip install "hanzoai[full]"

Migration:
- Old: from hanzo_agents import Agent
- New: from agents import Agent (in hanzo-agent submodule)

Related: Agent SDK now at github.com/hanzoai/agent
2025-10-28 21:14:24 -07:00
zeekay 4572399cb3 fix: move test file to correct location for CI 2025-09-07 15:47:56 -05:00
zeekay 2a128c8491 fix: resolve all lint issues for CI compliance
- Fix import sorting in multiple files
- Replace bare except with except Exception
- Remove broken auth file with syntax errors
2025-09-07 15:43:50 -05:00
zeekay 674e329c06 fix: resolve import sorting lint issue in test_tool_detector.py 2025-09-07 15:35:01 -05:00
zeekay f7aecfbf52 fix: improve AI tool detection and fallback mechanism (v0.3.31)
- Fix Hanzo Node detection to test actual chat endpoint instead of health check
- Check both ports 3690 (default) and 8000 for Hanzo Node
- Add session-based failed tool tracking to avoid repeated attempts
- Cache working tool selection for better performance
- Fix hanzo-mcp integration with proper dependencies
- Add comprehensive test suite for tool detection (14 tests)
- Test and verify OpenAI Codex integration
2025-09-07 15:33:06 -05:00
zeekay b95489a436 fix: Correct Hanzo Node port to 3690
- Fix Hanzo Node health check to use port 3690 (not 8000)
- Update chat completions endpoint to use correct port
- Fix status display to show correct port number
- This allows proper detection and use of local Hanzo Node
2025-09-06 07:53:06 -05:00
zeekay 8e6f5f2458 fix: Improve AI tool detection and fallback handling
- Fix Hanzo Node detection to verify chat endpoint actually works
- Skip Hanzo Node if /v1/chat/completions returns 404
- Add proper fallback chain when primary tool fails
- Show helpful error messages and suggest working alternatives
- agent will be used when Hanzo Node isn't functional
2025-09-06 07:51:14 -05:00
zeekay 02f02aa3b6 feat: Add native todo management to Hanzo REPL
- Add /todo command with full todo management capabilities
- Quick add with tags, priority, and due dates: /todo Buy milk #shopping !high @tomorrow
- Comprehensive todo operations: add, list, done, start, cancel, delete, view, stats
- Persistent storage in ~/.hanzo/todos.json
- Rich display with tables and emoji status indicators
- Advanced filtering by status, priority, and tags
- Statistics dashboard with completion rates
- Shortcut /t for quick access
2025-09-06 07:39:39 -05:00
zeekay f134900f0d feat(cli): Add Hanzo Node as highest priority for local private AI
- Hanzo Node (hanzod) now highest priority when running on localhost:8000
- Provides completely private, local AI - data never leaves your machine
- Detects running Hanzo Router on localhost:4000 as LLM proxy
- Priority chain: Hanzo Node → Router → agent → other tools
- Shows model count when Hanzo Node is running
- Special messaging for privacy when using local AI
- Version 0.3.27 with enhanced local AI support
2025-09-06 06:49:36 -05:00
zeekay 07d3013634 feat(cli): Auto-detect AI coding tools with agent as default
- Detect available AI tools: agent, OpenAI Codex, Gemini CLI, Grok, OpenHands, Hanzo Dev
- agent is default when available, with intelligent fallback chain
- Display detected tools as 'agent: Tool Name' in REPL
- Quick model selector with arrow key navigation (press ↓ for menu)
- Background task management with /tasks and /kill commands
- Tools integrated into /model command for seamless switching
- Version 0.3.26 with enhanced AI tool integration
2025-09-06 06:43:20 -05:00
zeekay 5529cb9ffa fix(cli): Remove lock icons from REPL, publish v0.3.25 to PyPI
- Simplified model display to just show 'model: provider/model-name'
- Removed authentication lock icons for cleaner interface
- Successfully published to PyPI at https://pypi.org/project/hanzo/0.3.25/
2025-09-06 06:33:18 -05:00
zeekay 42f1941a4a feat(cli): Simplify REPL prompt to clean > with model info below
- Remove 'hanzo' prefix from prompt, just show clean '>'
- Display model info below input: 'model: provider/model-name'
- Show auth status with lock icons
- Version bump to 0.3.25 for PyPI release
2025-09-06 06:31:59 -05:00
zeekay f0eb32c879 feat(cli): Add enhanced REPL with model selection and authentication status
- Display current model in REPL prompt (e.g., hanzo [gpt] 🔓 >)
- Add /model command for easy model switching
- Add /status command showing auth and system status
- Add /login and /logout commands for authentication
- Show authentication status with lock/unlock icons
- Support for switching between 20+ AI models
- Enhanced startup UI with version and changelog integration
- Fixed async auth commands to work with Click CLI
2025-09-06 06:21:12 -05:00
zeekay 8a864f052c feat(ui): Add beautiful startup UI with changelog integration
- Create comprehensive startup UI with ASCII art branding
- Add What's New section with GitHub changelog integration
- Implement update checking from PyPI
- Show system status (Router, Node, API) indicators
- Add quick start tips and command hints
- Create inline startup notifications for commands
- Support minimal UI mode with environment variables
- Cache changelog data for offline usage
- Smart display logic (show once per day for inline)
- Version bump to 0.3.23

The UI provides a clean, informative startup experience similar to agent,
with automatic update notifications and helpful tips for new users.
2025-09-06 06:10:33 -05:00
zeekay a8a1ebc5e5 chore(mcp): fix stdio-safe CLI import order; quiet logging; bump hanzo-mcp to 0.8.4 and hanzo to 0.3.24 2025-09-06 06:06:10 -05:00
zeekay 8e0b3c1149 docs: Add comprehensive documentation for all packages
- Create detailed README for main repository with architecture overview
- Add package-specific READMEs with usage examples and API documentation
- Create CONTRIBUTING.md with development guidelines and workflow
- Update LLM.md with architectural decisions and patterns
- Document all CLI commands, configuration options, and best practices
- Include installation, testing, and deployment instructions
- Add code examples for all major features
- Document port allocation strategy and integration points
- Ensure 100% test pass rate (197 tests passing)
2025-09-06 04:21:20 -05:00
zeekay c5905180f7 fix: Resolve all linting issues for CI compliance
- Fix syntax errors (indentation) in hanzo-mcp tools
- Replace all bare except statements with except Exception
- Fix import sorting issues across all packages
- Update type annotations to use modern X | Y syntax for Python 3.10+
- Ensure all packages pass ruff linting checks
2025-09-06 03:43:53 -05:00
zeekay 88854e11e8 refactor: Rename cluster to node and add router management
- Renamed 'cluster' terminology to 'node' throughout codebase for clarity
- Added new 'hanzo router' command for managing LLM proxy server
- Added zsh shell tool with automatic shell detection (prefers zsh over bash)
- Fixed REPL to use cloud mode by default to avoid local server dependency
- Updated chat command to try router (port 4000) before local node (port 8000)
- Added comprehensive Grok documentation to README
- Created NODE_COMPATIBILITY.md documenting integration with desktop app and network

BREAKING CHANGE: 'hanzo cluster' commands now use 'hanzo node' - old commands still work via aliases

Key changes:
- hanzo node start/stop/status - manage local AI nodes
- hanzo router start/stop/status - manage LLM proxy router
- hanzo node worker - manage node workers (formerly cluster nodes)
- Zsh is now default shell when available
- Router runs on port 4000, nodes on port 8000
- Full compatibility with Hanzo desktop app and network layer
2025-09-06 03:27:43 -05:00
zeekay 3fbebf0b14 feat(mcp config): support tools.*.enabled; feat(fs): 'symbols' alias for 'ast'; test: disable pytest plugin autoload for local+CI; chore: bump mcp to 0.8.3; docs: update AGENTS.md; integrate new unified agent architecture + model registry + batch orchestrator 2025-09-05 20:28:26 -05:00
zeekay a99730cbb0 feat: Add CLI tools support to hanzo-mcp with batch execution
- Implement unified CLI tools module for all AI providers
- Add support for claude/cc, codex, gemini, grok, openhands/oh, hanzo-dev, cline, aider
- Enable parallel batch execution of CLI tools
- Add comprehensive test suite with 16 passing tests
- Fix typing issues with mypy strict mode
- Add GitHub Actions CI/CD workflow with optional integration tests
- Support authentication flow for all providers
- Follow DRY principle with single source of truth
2025-09-05 18:26:03 -05:00
zeekay f80e78b872 feat: Add streaming, rate limiting, and enhanced testing to hanzo dev
Major improvements:
- Streaming responses with real-time feedback
- Smart rate limiting with exponential backoff
- Error recovery with circuit breaker pattern
- Comprehensive test suite (all tests passing)
- Fixed CI/CD pipeline issues
- TypeWriter effect for code display
- Adaptive rate limits per API provider

Performance:
- Prevents API overuse with smart throttling
- Automatic fallback on rate limit errors
- Burst protection and cooldown periods
- Per-API customized limits

Version bump to 0.3.21
2025-08-20 04:17:18 -05:00
zeekay 2d617d2014 feat: Add intelligent fallback and memory management to hanzo dev
- Automatic fallback handler tries all available AI options
- Memory persistence with #memory commands (like Claude Desktop)
- Smart context management with priority-based memories
- Session tracking and user preferences
- Export/import memory capabilities
- Enhanced AI responses with contextual awareness
- Version bump to 0.3.20
2025-08-19 22:11:42 -05:00
zeekay 9e31283aa5 fix: Fix import ordering for ruff linting 2025-08-19 21:16:57 -05:00
zeekay 8d48ba345d feat: Complete hanzo dev chat-first REPL with multi-orchestrator support
- Chat-first interface (natural language by default)
- Claude Desktop-style UI with light gray borders
- Support for multiple orchestrators (GPT-5, Codex, Claude, local models)
- CLI tool integration (OpenAI CLI, Claude Desktop, Gemini CLI, Hanzo IDE)
- System 2 thinking with critic agents
- Comprehensive test coverage with real AI validation
- Version bump to 0.3.19
2025-08-19 21:13:47 -05:00
zeekay 4957658b27 fix: Fix Box definition error in REPL UI
- Fix 'not enough values to unpack' error by using predefined ROUNDED box
- Simplify input handling to avoid prompt_toolkit complexity
- Keep the visual bordered input box design
- Bump version to 0.3.18

The UI now works without crashing on startup!
2025-08-19 13:57:28 -05:00
zeekay 7d026cdf0f feat: Add Claude-style UI with light gray bordered input boxes
- Implement bordered input boxes with light gray styling (╭─╮ borders)
- Add styled response panels for AI outputs
- Use prompt_toolkit for better input handling with custom styles
- Add modern › prompt symbol instead of basic >
- Improve header with panel styling
- Make all AI responses display in consistent bordered panels
- Better error handling for Ctrl+C and Ctrl+D
- Version bump to 0.3.17

The interface now looks much more polished with Claude-like aesthetics!
2025-08-19 12:34:23 -05:00
zeekay a5a7ec5e58 fix: Correct OpenAI CLI syntax for chat completions
- Fix openai CLI command to use correct syntax: chat.completions.create
- Use -g flag instead of -p for message input
- Bump version to 0.3.16

The correct command is now:
openai api chat.completions.create -m gpt-4 -g 'message'
2025-08-19 12:23:01 -05:00
zeekay 1d867cd7b9 fix: Make hanzo dev chat actually work with all orchestrator models
- Fix chat_with_agents to properly route to direct API chat for CLI tools
- Implement working _send_to_instance that uses real AI models
- Add proper methods for OpenAI CLI, Claude Desktop, Gemini CLI
- Add proper methods for local models via Ollama
- Fix multi-Claude orchestrator to use actual AI instead of placeholders
- Bump version to 0.3.15

Now hanzo dev --orchestrator codex actually works!
2025-08-19 11:18:39 -05:00