mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-26 11:49:36 +00:00
Our SDKs are generated by openapi-generator on our own CI. The docs said a hosted third-party service, which we retired: hanzoai/openapi's LLM.md and its regenerate-sdks.yml both already said so, while its README still called that service "canonical" and told a reader to fetch an API key for it out of KMS. Two sources disagreeing is how somebody follows the wrong one, and the wrong one here sends them looking for a credential that should not exist. The same claim had spread to what customers and agents read: five pages on docs.hanzo.ai and six agent skills advertised a vendor we do not use, and hip-0040 -- the standard for multi-language SDKs -- argued FOR it by name. The argument survives without the brand, because it was never about the vendor: one spec beats N hand-written clients. python-sdk's mock script also pulled that vendor's fork of prism-cli; it takes upstream @stoplight/prism-cli now. What is deliberately left alone is every occurrence that is not about us: a filament material in a 3D-printer integration, a browser of that name in three user-agent parsers, tokenizer vocabulary where the string is a token id, and citations recording where Mux, Perigon and Stigg publish their own specs. Renaming any of those breaks something real.
hanzo-tools-shell
Shell execution tools for Hanzo MCP with DAG support and Shellflow DSL.
Installation
pip install hanzo-tools-shell
Tools
dag - DAG Execution Engine
Execute commands with directed acyclic graph semantics.
# Serial execution (default)
dag(["ls", "pwd", "git status"])
# Parallel execution
dag(["npm install", "cargo build"], parallel=True)
# Mixed DAG with parallel blocks
dag([
"mkdir -p dist",
{"parallel": ["cp a.txt dist/", "cp b.txt dist/"]},
"zip -r out.zip dist/"
])
# Tool invocations
dag([{"tool": "search", "input": {"pattern": "TODO"}}])
# Named nodes with dependencies
dag([
{"id": "build", "run": "make build"},
{"id": "test", "run": "make test", "after": ["build"]},
])
zsh - Primary Shell with Shellflow DSL
Execute shell commands with optional Shellflow syntax.
# Simple command
zsh("ls -la")
# Shellflow DSL syntax
zsh("mkdir dist ; { cp a dist/ & cp b dist/ } ; zip out")
# With shell parameter
zsh("echo $BASH_VERSION", shell="bash")
Shellflow Syntax:
A ; B- Sequential execution{ A & B }- Parallel executionA ; { B & C } ; D- Mixed DAG
ps - Process Management
Monitor and control background processes.
ps() # List all processes
ps(id="abc123") # Get specific process
ps(kill="abc123") # Kill process (SIGTERM)
ps(logs="abc123", n=50) # Last 50 lines of output
Additional Tools
- shell - Smart shell (zsh > bash fallback)
- bash - Explicit bash execution
- npx - Node package execution with auto-backgrounding
- uvx - Python package execution with auto-backgrounding
- open - Open files/URLs in system apps
- curl - HTTP client without shell escaping issues
- jq - JSON processor
- wget - File/site downloads
Auto-Backgrounding
Commands that exceed the timeout (default 60s) are automatically backgrounded:
dag(["long-running-command"], timeout=30)
# If command exceeds 30s, it continues in background
# Use ps --logs <id> to view output
Performance
Shellflow DSL is optimized for high throughput:
- Simple commands: ~7M ops/sec
- Sequential: ~2.2M ops/sec
- Mixed DAG: ~100k ops/sec
License
MIT