Skip to content

Release 0.4.0

Choose a tag to compare

@tercel tercel released this 20 Feb 14:20
· 4 commits to main since this release

Added

Streaming Support

  • Executor.stream() - New async generator method for streaming module execution
  • Implements same 6-step pipeline as call_async() (context, safety, lookup, ACL, input validation, middleware before)
  • Falls back to call_async() yielding single chunk for non-streaming modules
  • For streaming modules, iterates module.stream() and yields each chunk
  • Accumulates chunks via shallow merge for output validation and after-middleware
  • Full error handling with middleware recovery
  • ModuleAnnotations.streaming - New streaming: bool = False field to indicate if a module supports streaming execution
  • Test coverage - Added 5 comprehensive tests in test_executor_stream.py:
  • Fallback behavior for non-streaming modules
  • Multi-chunk streaming
  • Module not found error handling
  • Before/after middleware integration
  • Disjoint key accumulation via shallow merge