Files
python-sdk/pkg/hanzo-tools-shell/pyproject.toml
T
zeekay a8eb3c4b67 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

31 lines
811 B
TOML

[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "hanzo-tools-shell"
version = "0.4.1"
description = "Shell/command execution tools - dag, zsh (with shellflow DSL), ps, npx, uvx, open, curl, jq, wget"
readme = "README.md"
requires-python = ">=3.12"
license = { text = "MIT" }
authors = [{ name = "Hanzo Industries Inc", email = "[email protected]" }]
keywords = ["hanzo", "tools", "shell", "mcp", "ai", "dag", "zsh"]
dependencies = [
"hanzo-tools>=0.3.0",
"mcp>=1.25.0",
"pydantic>=2.12.5",
"aiofiles>=24.0.0",
"tiktoken>=0.8.0",
]
[project.entry-points."hanzo.tools"]
shell = "hanzo_tools.shell:TOOLS"
[tool.setuptools.packages.find]
where = ["."]
include = ["hanzo_tools*"]
[tool.setuptools.package-data]
"*" = ["py.typed"]