pub struct FxRuntime { /* private fields */ }Implementations§
Source§impl FxRuntime
impl FxRuntime
pub fn new(options: RuntimeOptions) -> Result<Self, RuntimeError>
pub fn from_process( model_override: Option<String>, ) -> Result<Self, RuntimeError>
pub fn auth_methods(&self) -> Vec<AuthMethod>
pub fn models(&self) -> Vec<Model>
pub async fn authenticate(&self, method_id: &str) -> Result<bool, RuntimeError>
pub async fn refresh_models_once(&self) -> Result<bool, RuntimeError>
pub async fn session_configurations( &self, ) -> Result<Vec<RuntimeSessionConfiguration>, RuntimeError>
pub async fn logout(&self) -> Result<(), RuntimeError>
pub async fn shutdown(&self)
pub async fn create_session( &self, cwd: PathBuf, additional_directories: Vec<PathBuf>, mcp_config: McpConfig, ) -> Result<RuntimeSessionSetup, RuntimeError>
pub async fn load_session( &self, id: String, cwd: PathBuf, additional_directories: Vec<PathBuf>, mcp_config: McpConfig, replay: bool, ) -> Result<RuntimeSessionLoad, RuntimeError>
pub async fn list_sessions( &self, cwd: Option<PathBuf>, cursor: Option<String>, ) -> Result<RuntimeSessionList, RuntimeError>
pub fn cancellation( &self, session_id: &str, ) -> Result<Arc<SessionCancellation>, RuntimeError>
pub fn cancel_session(&self, session_id: &str)
pub fn set_session_mode( &self, session_id: &str, mode_id: &str, ) -> Result<(), RuntimeError>
pub async fn set_session_config_option( &self, session_id: &str, config_id: &str, value: &str, ) -> Result<RuntimeSessionConfiguration, RuntimeError>
pub async fn close_session(&self, session_id: &str) -> Result<(), RuntimeError>
pub async fn prompt( &self, session_id: &str, prompt: String, approvals: &mut dyn ApprovalHandler, events: &mut dyn AgentEventSink, ) -> Result<RuntimeStopReason, RuntimeError>
Auto Trait Implementations§
impl !Freeze for FxRuntime
impl !RefUnwindSafe for FxRuntime
impl !UnwindSafe for FxRuntime
impl Send for FxRuntime
impl Sync for FxRuntime
impl Unpin for FxRuntime
impl UnsafeUnpin for FxRuntime
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.