pub struct SubagentFilter { /* private fields */ }Expand description
The transformer behind SubagentVisibility.
Both modes keep the consuming normalizer’s model of the stream — one open
chunk-continuable stream per owner — because a *_CHUNK event that names
no id is resolved through its attribution on the consuming side, and
stripping the attribution would send it to the wrong stream. Such a chunk
is given the id it resolves to (and, for a tool call, the name the
consumer needs to reopen it) before its tag goes.
Hidden additionally remembers what each
subagent owns — messages, tool calls, activities — for the rest of the
run, not only while they are open, so an untagged continuation, re-open,
patch or result for a subagent’s entity is dropped with the rest of it
rather than leaking into the parent’s stream. That is the owner-aware
verifier’s reading too: the first writer owns the id, and an absent tag
agrees with any owner. An entity the consumer has seen opened keeps that
visibility until it closes, whatever a snapshot says about its owner
meanwhile — a consumer must never be left with a message it saw opened
and never sees closed.
Implementations§
Source§impl SubagentFilter
impl SubagentFilter
Sourcepub fn new(mode: SubagentVisibility) -> Self
pub fn new(mode: SubagentVisibility) -> Self
A filter for mode.
Sourcepub fn mode(&self) -> SubagentVisibility
pub fn mode(&self) -> SubagentVisibility
The mode this filter applies.