Files
python-sdk/pkg
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
..