Expand description
The one extension point: rewriting the event stream on its way out.
Event observers, filters and rewriters implement StreamTransformer.
Built-in transformers include ToolResultToState and
SubagentVisibility.
Transformers run in the order they were added, each seeing what the previous
one produced, before the ordering verifier sees anything. That order is what
makes FilterToolCalls safe: the verifier never sees the half of a tool
call that was dropped.
let chain = TransformerChain::new()
.with(FilterToolCalls::deny(["internal_debug"]))
.with(ToolResultToState::snapshot("load_document").replacing());
assert_eq!(chain.len(), 2);Structs§
- Filter
Tool Calls - Drops whole tool calls by tool name.
- Subagent
Filter - The transformer behind
SubagentVisibility. - Tool
Result ToState - Promotes a named tool’s result into a state event.
- Transformer
Chain - Transformers applied in sequence.
Enums§
- Subagent
Visibility - What a consumer sees of an agent’s subagents.
Traits§
- Stream
Transformer - Rewrites events on their way from an agent to the transport.