pub struct AgentDirectory { /* private fields */ }Expand description
Process-level registry for installed Agent connectors.
Connector IDs namespace session IDs. Two different Agents may therefore expose the same opaque session ID without colliding.
Implementations§
Source§impl AgentDirectory
impl AgentDirectory
pub fn new() -> Self
pub async fn register( &self, connector: Arc<dyn AgentConnector>, provider: Arc<dyn AgentProvider>, ) -> Result<(), AgentDirectoryError>
pub async fn register_with_journal( &self, connector: Arc<dyn AgentConnector>, provider: Arc<dyn AgentProvider>, journal: Arc<dyn AgentJournalStore>, ) -> Result<(), AgentDirectoryError>
pub async fn connectors(&self) -> Vec<AgentConnectorDescriptor>
pub async fn health( &self, connector_id: &AgentConnectorId, ) -> Result<AgentConnectorHealth, AgentDirectoryError>
pub async fn list_sessions( &self, connector_id: &AgentConnectorId, query: AgentSessionListQuery, ) -> Result<AgentSessionPage, AgentDirectoryError>
pub async fn read_session( &self, connector_id: &AgentConnectorId, session_id: &AgentSessionId, ) -> Result<AgentSessionDetail, AgentDirectoryError>
pub async fn read_session_page( &self, connector_id: &AgentConnectorId, session_id: &AgentSessionId, query: AgentSessionReadQuery, ) -> Result<AgentSessionDetail, AgentDirectoryError>
pub async fn subscribe_session_changes( &self, connector_id: &AgentConnectorId, session_id: &AgentSessionId, ) -> Result<Receiver<AgentSessionChange>, AgentDirectoryError>
pub async fn resolve_request( &self, connector_id: &AgentConnectorId, request: ResolveAgentSessionRequest, ) -> Result<(), AgentDirectoryError>
pub async fn create_session( &self, connector_id: &AgentConnectorId, request: CreateAgentSessionRequest, ) -> Result<AgentSessionSummary, AgentDirectoryError>
pub async fn invoke_action( &self, connector_id: &AgentConnectorId, request: InvokeAgentSessionActionRequest, ) -> Result<AgentSessionActionOutcome, AgentDirectoryError>
Sourcepub async fn start_text(
&self,
connector_id: &AgentConnectorId,
session_id: &AgentSessionId,
run_id: Option<RunId>,
input: impl Into<String>,
) -> Result<AgentRunHandle, AgentDirectoryError>
pub async fn start_text( &self, connector_id: &AgentConnectorId, session_id: &AgentSessionId, run_id: Option<RunId>, input: impl Into<String>, ) -> Result<AgentRunHandle, AgentDirectoryError>
Start one Agent Protocol Run against a connector-owned session.
Sourcepub async fn start_content(
&self,
connector_id: &AgentConnectorId,
session_id: &AgentSessionId,
run_id: Option<RunId>,
input: Vec<Content>,
) -> Result<AgentRunHandle, AgentDirectoryError>
pub async fn start_content( &self, connector_id: &AgentConnectorId, session_id: &AgentSessionId, run_id: Option<RunId>, input: Vec<Content>, ) -> Result<AgentRunHandle, AgentDirectoryError>
Start one Agent Protocol Run with provider-neutral Content blocks.
Sourcepub async fn start_content_with_extensions(
&self,
connector_id: &AgentConnectorId,
session_id: &AgentSessionId,
run_id: Option<RunId>,
input: Vec<Content>,
extensions: Extensions,
) -> Result<AgentRunHandle, AgentDirectoryError>
pub async fn start_content_with_extensions( &self, connector_id: &AgentConnectorId, session_id: &AgentSessionId, run_id: Option<RunId>, input: Vec<Content>, extensions: Extensions, ) -> Result<AgentRunHandle, AgentDirectoryError>
Starts a Run with digest-bound, namespaced Host metadata. The directory keeps this provider-neutral and forwards the immutable extensions through the shared Agent Protocol controller.
pub async fn agent_api( &self, connector_id: &AgentConnectorId, ) -> Result<AgentApi, AgentDirectoryError>
Trait Implementations§
Source§impl Default for AgentDirectory
impl Default for AgentDirectory
Source§fn default() -> AgentDirectory
fn default() -> AgentDirectory
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for AgentDirectory
impl !RefUnwindSafe for AgentDirectory
impl !UnwindSafe for AgentDirectory
impl Send for AgentDirectory
impl Sync for AgentDirectory
impl Unpin for AgentDirectory
impl UnsafeUnpin for AgentDirectory
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
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.