pub struct SessionRpcAgent<'a> { /* private fields */ }Expand description
session.agent.* RPCs.
Implementations§
Source§impl<'a> SessionRpcAgent<'a>
impl<'a> SessionRpcAgent<'a>
Sourcepub async fn list(&self) -> Result<AgentList, Error>
pub async fn list(&self) -> Result<AgentList, Error>
Lists custom agents available to the session.
Wire method: session.agent.list.
§Returns
Custom agents available to the session.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn get_current(&self) -> Result<AgentGetCurrentResult, Error>
pub async fn get_current(&self) -> Result<AgentGetCurrentResult, Error>
Gets the currently selected custom agent for the session.
Wire method: session.agent.getCurrent.
§Returns
The currently selected custom agent, or null when using the default agent.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn select(
&self,
params: AgentSelectRequest,
) -> Result<AgentSelectResult, Error>
pub async fn select( &self, params: AgentSelectRequest, ) -> Result<AgentSelectResult, Error>
Selects a custom agent for subsequent turns in the session.
Wire method: session.agent.select.
§Parameters
params- Name of the custom agent to select for subsequent turns.
§Returns
The newly selected custom agent.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn deselect(&self) -> Result<(), Error>
pub async fn deselect(&self) -> Result<(), Error>
Clears the selected custom agent and returns the session to the default agent.
Wire method: session.agent.deselect.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn reload(&self) -> Result<AgentReloadResult, Error>
pub async fn reload(&self) -> Result<AgentReloadResult, Error>
Reloads custom agent definitions and returns the refreshed list.
Wire method: session.agent.reload.
§Returns
Custom agents available to the session after reloading definitions from disk.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Trait Implementations§
Source§impl<'a> Clone for SessionRpcAgent<'a>
impl<'a> Clone for SessionRpcAgent<'a>
Source§fn clone(&self) -> SessionRpcAgent<'a>
fn clone(&self) -> SessionRpcAgent<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more