pub struct Orchestrator { /* private fields */ }Expand description
The orchestrator coordinates the full Ouroboros lifecycle.
Implementations§
Source§impl Orchestrator
impl Orchestrator
Sourcepub fn new(
ouroboros: Arc<dyn OuroborosProtocol>,
event_bus: EventBus,
state_store: Arc<StateStore>,
lifecycle: AgentLifecycleManager,
) -> Self
pub fn new( ouroboros: Arc<dyn OuroborosProtocol>, event_bus: EventBus, state_store: Arc<StateStore>, lifecycle: AgentLifecycleManager, ) -> Self
Creates a new orchestrator.
Sourcepub fn with_config(
ouroboros: Arc<dyn OuroborosProtocol>,
event_bus: EventBus,
state_store: Arc<StateStore>,
lifecycle: AgentLifecycleManager,
config: OrchestratorConfig,
) -> Self
pub fn with_config( ouroboros: Arc<dyn OuroborosProtocol>, event_bus: EventBus, state_store: Arc<StateStore>, lifecycle: AgentLifecycleManager, config: OrchestratorConfig, ) -> Self
Creates a new orchestrator with custom config.
Sourcepub fn set_space_manager(&self, manager: Arc<SpaceManager>)
pub fn set_space_manager(&self, manager: Arc<SpaceManager>)
Set the SpaceManager for context partitioning.
Sourcepub fn current_space_id(&self) -> Option<SpaceId>
pub fn current_space_id(&self) -> Option<SpaceId>
Get the current Space ID, if SpaceManager is set.
Sourcepub fn current_space_tag(&self) -> String
pub fn current_space_tag(&self) -> String
Get the current Space name tag for response decoration.
Sourcepub fn set_a2a(&mut self, a2a: Arc<A2AProtocol>)
pub fn set_a2a(&mut self, a2a: Arc<A2AProtocol>)
Set the A2A protocol for inter-agent task delegation.
Sourcepub fn set_git_layer(&mut self, git_layer: Arc<GitLayer>)
pub fn set_git_layer(&mut self, git_layer: Arc<GitLayer>)
Set the GitLayer for auto-commits after state saves.
Sourcepub async fn handle_message(
&self,
user_id: &str,
user_message: &str,
session_id: Option<&str>,
) -> Result<OrchestrationResult>
pub async fn handle_message( &self, user_id: &str, user_message: &str, session_id: Option<&str>, ) -> Result<OrchestrationResult>
Handle a user message through the full Ouroboros loop.
Returns an OrchestrationResult with the response and metadata.
If the interview phase needs clarification (ambiguity > 0.2),
the result will contain the questions and the phase will be
Phase::Interview. The caller should send these questions to
the user and include the session_id in follow-up messages.
Sourcepub async fn delegate_subtasks(
&self,
subtasks: Vec<SubTask>,
parent_seed: &Seed,
) -> Result<Vec<SubTask>>
pub async fn delegate_subtasks( &self, subtasks: Vec<SubTask>, parent_seed: &Seed, ) -> Result<Vec<SubTask>>
Execute multiple subtasks using separate agents in parallel.
When A2A is available, the orchestrator delegates tasks through the A2A protocol with circuit breaker and retry support. Otherwise, falls back to direct lifecycle execution.
Results are collected as they complete using JoinSet.
Auto Trait Implementations§
impl !Freeze for Orchestrator
impl !RefUnwindSafe for Orchestrator
impl Send for Orchestrator
impl Sync for Orchestrator
impl Unpin for Orchestrator
impl UnsafeUnpin for Orchestrator
impl !UnwindSafe for Orchestrator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.