Skip to main content

token_stream_controller 0.1.0 copy "token_stream_controller: ^0.1.0" to clipboard
token_stream_controller: ^0.1.0 copied to clipboard

Pure Dart asynchronous token stream controller with transient reasoning phases, throughput telemetry, cancellation, and guaranteed cleanup.

0.1.0 #

  • Initial release of token_stream_controller.
  • Pure Dart zero-dependency asynchronous token streaming engine.
  • Deterministic lifecycle phases: idle, thinking, streaming, completed, cancelled, and failed.
  • Transient reasoning status tracking with automatic cleanup upon output token arrival or termination.
  • Real-time throughput telemetry (tokensPerSecond) and elapsed duration tracking.
  • Guaranteed try-finally loading-state cleanup across all completion, cancellation, error, and timeout paths.
  • Deterministic text simulation via simulateText for offline copilots, widget tests, and demos.
  • Robust chunk timeout handling with TokenStreamException.
  • Explicit mid-stream cancellation with cancel().
  • State reset via reset() and controller lifecycle management via dispose().
  • Multi-turn stream accumulation support with appendToExisting.
1
likes
160
points
68
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Pure Dart asynchronous token stream controller with transient reasoning phases, throughput telemetry, cancellation, and guaranteed cleanup.

Repository (GitHub)
View/report issues

Topics

#streams #async #llm #ai #state-management

License

MIT (license)

More

Packages that depend on token_stream_controller