Expand description
Streaming response types, config, and cancellation support for Gestura.
gestura-core-streaming provides the shared building blocks for incremental
LLM response delivery across the workspace. It defines the streaming event
model surfaced to UIs, the decoupled streaming configuration types used at
runtime, and the cancellation registry that coordinates interruption of
in-flight streams.
§Responsibilities
streaming: core streaming events, provider-specific streaming helpers, token-usage updates, tool-call chunks, shell output chunks, and status notifications used by CLI/GUI frontendsconfig: a portableStreamingConfigmodel derived from application configuration without tying the streaming crate directly toAppConfigcancellation: cooperative cancellation-token registry for active streams
§Architecture boundary
This crate owns the streaming protocol and runtime primitives. Higher-level
orchestration—such as deciding when to start a stream, how to bridge it into
sessions, and how to mix streaming with tool execution—remains in
gestura-core.
§Stable import paths
Most consumers should import through the facade re-exports:
gestura_core::streaming::*gestura_core::stream_cancellation::*
§Why the config is separate
StreamingConfig mirrors only the subset of provider configuration needed
for streaming. This keeps the crate portable, easier to test, and less
tightly coupled to the larger application configuration surface.
Re-exports§
pub use cancellation::STREAM_CANCELLATIONS;pub use cancellation::StreamCancellationRegistry;pub use config::AnthropicProviderConfig;pub use config::GeminiProviderConfig;pub use config::GrokProviderConfig;pub use config::OllamaProviderConfig;pub use config::OpenAiProviderConfig;pub use config::StreamingConfig;pub use streaming::*;
Modules§
- cancellation
- Streaming cancellation registry.
- config
- Streaming-specific configuration types.
- streaming
- Streaming LLM provider support for Gestura