pub struct Relay { /* private fields */ }Implementations§
Source§impl Relay
impl Relay
pub fn new(roster_size: usize, max_rounds: usize) -> Self
pub fn strategy(&self) -> CollaborationStrategy
Sourcepub fn set_strategy(&mut self, strategy: CollaborationStrategy)
pub fn set_strategy(&mut self, strategy: CollaborationStrategy)
Change routing for future turns. This does not discard queued work or
alter the public context journal; it only affects the next automatic
recipient. Pair selection is re-derived from the next first value.
pub fn active_slots(&self) -> impl Iterator<Item = RosterSlot> + '_
pub fn pause(&mut self)
pub fn resume(&mut self)
pub fn tombstone(&mut self, slot: RosterSlot) -> Result<(), &'static str>
Sourcepub fn mark_limited(&mut self, slot: RosterSlot) -> Result<(), &'static str>
pub fn mark_limited(&mut self, slot: RosterSlot) -> Result<(), &'static str>
Flag a slot whose provider plan is exhausted. Routing skips it but its queued prompts and roster identity are preserved for a later recharge.
Sourcepub fn clear_limited(&mut self, slot: RosterSlot) -> Result<(), &'static str>
pub fn clear_limited(&mut self, slot: RosterSlot) -> Result<(), &'static str>
Clear a usage-limit flag after a recharge or adapter reload.
pub fn is_limited(&self, slot: RosterSlot) -> bool
Sourcepub fn routable_slots(&self) -> impl Iterator<Item = RosterSlot> + '_
pub fn routable_slots(&self) -> impl Iterator<Item = RosterSlot> + '_
Slots that can currently receive a turn.
pub fn reactivate(&mut self, slot: RosterSlot) -> Result<(), &'static str>
pub fn drop_agent(&mut self, slot: RosterSlot) -> Result<(), &'static str>
Sourcepub fn swap_agents(
&mut self,
first: RosterSlot,
second: RosterSlot,
) -> Result<(), &'static str>
pub fn swap_agents( &mut self, first: RosterSlot, second: RosterSlot, ) -> Result<(), &'static str>
Exchange two live roster slots while preserving adapter identity in queued work, routing cursors, and per-agent context watermarks.
pub fn enqueue_human( &mut self, prompt: impl Into<String>, selected: Option<RosterSlot>, ) -> bool
pub fn enqueue_direct( &mut self, slot: RosterSlot, prompt: impl Into<String>, ) -> Result<bool, &'static str>
pub fn queued_count(&self) -> usize
pub fn record_public( &mut self, speaker: impl Into<String>, text: impl Into<String>, )
pub fn mark_context_seen(&mut self, slot: RosterSlot)
pub fn unseen_context(&mut self, slot: RosterSlot) -> String
pub fn add_agent(&mut self)
Sourcepub fn begin(
&mut self,
initial_prompt: impl Into<String>,
first: RosterSlot,
) -> RelayDecision
pub fn begin( &mut self, initial_prompt: impl Into<String>, first: RosterSlot, ) -> RelayDecision
Select the next causal turn. Direct work always precedes steering work.
Sourcepub fn finish(&mut self, slot: RosterSlot, direct: bool, accepted_stop: bool)
pub fn finish(&mut self, slot: RosterSlot, direct: bool, accepted_stop: bool)
Finalize a dispatched turn and choose the next ring position. Direct turns never become shared relay context.