pub struct AgentRegistry { /* private fields */ }Expand description
Registry and scheduler for independent Pi subprocesses.
Each running agent owns a distinct Pi process and persistent session. The registry only starts dependency-ready work, bounds all queues and retained evidence, and never silently promotes a failed dependency to success.
Implementations§
Source§impl AgentRegistry
impl AgentRegistry
pub fn new(root: impl AsRef<Path>) -> DevelopmentResult<Self>
pub fn set_resident_broker( &mut self, broker: ResidentAgentBroker, ) -> DevelopmentResult<()>
pub fn set_additional_system_prompt( &mut self, prompt: Option<String>, ) -> DevelopmentResult<()>
Sourcepub fn additional_system_prompt(&self) -> Option<&str>
pub fn additional_system_prompt(&self) -> Option<&str>
Active user-global and trusted-project instructions supplied to Pi.
pub fn set_defaults( &mut self, model: Option<String>, thinking: Option<String>, ) -> DevelopmentResult<()>
pub fn create(&mut self, spec: AgentSpec) -> DevelopmentResult<AgentId>
pub fn refresh(&mut self) -> DevelopmentResult<()>
pub fn snapshot(&mut self, id: &AgentId) -> DevelopmentResult<AgentSnapshot>
pub fn list(&mut self) -> DevelopmentResult<Vec<AgentSnapshot>>
pub fn history(&mut self, since: u64) -> DevelopmentResult<Vec<AgentEvent>>
pub fn prompt( &mut self, id: &AgentId, text: impl Into<String>, ) -> DevelopmentResult<()>
pub fn steer( &mut self, id: &AgentId, text: impl Into<String>, ) -> DevelopmentResult<()>
pub fn follow_up( &mut self, id: &AgentId, text: impl Into<String>, ) -> DevelopmentResult<()>
pub fn request( &mut self, id: &AgentId, request: PiSessionRequest, ) -> DevelopmentResult<()>
pub fn complete(&mut self, id: &AgentId) -> DevelopmentResult<()>
pub fn cancel(&mut self, id: &AgentId) -> DevelopmentResult<()>
Trait Implementations§
Source§impl Drop for AgentRegistry
impl Drop for AgentRegistry
Source§impl TaskAgentBackend for AgentRegistry
impl TaskAgentBackend for AgentRegistry
fn refresh_agents(&mut self) -> DevelopmentResult<()>
fn create_agent(&mut self, spec: AgentSpec) -> DevelopmentResult<AgentId>
fn agent_snapshots(&mut self) -> DevelopmentResult<Vec<AgentSnapshot>>
fn agent_events(&mut self, since: u64) -> DevelopmentResult<Vec<AgentEvent>>
fn prompt_agent( &mut self, id: &AgentId, prompt: String, ) -> DevelopmentResult<()>
fn cancel_agent(&mut self, id: &AgentId) -> DevelopmentResult<()>
fn complete_agent(&mut self, id: &AgentId) -> DevelopmentResult<()>
Auto Trait Implementations§
impl !RefUnwindSafe for AgentRegistry
impl !Sync for AgentRegistry
impl !UnwindSafe for AgentRegistry
impl Freeze for AgentRegistry
impl Send for AgentRegistry
impl Unpin for AgentRegistry
impl UnsafeUnpin for AgentRegistry
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.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> ⓘ
Converts
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> ⓘ
Converts
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 more