pub struct Runtime {
pub config: ConfigToml,
pub model_registry: ModelRegistry,
pub thread_manager: ThreadManager,
pub tool_registry: Arc<ToolRegistry>,
pub mcp_manager: Arc<McpManager>,
pub exec_policy: ExecPolicyEngine,
pub hooks: HookDispatcher,
pub jobs: JobManager,
}Fields§
§config: ConfigToml§model_registry: ModelRegistry§thread_manager: ThreadManager§tool_registry: Arc<ToolRegistry>§mcp_manager: Arc<McpManager>§exec_policy: ExecPolicyEngine§hooks: HookDispatcher§jobs: JobManagerImplementations§
Source§impl Runtime
impl Runtime
pub fn new( config: ConfigToml, model_registry: ModelRegistry, state: StateStore, tool_registry: Arc<ToolRegistry>, mcp_manager: Arc<McpManager>, exec_policy: ExecPolicyEngine, hooks: HookDispatcher, ) -> Self
pub async fn handle_thread( &mut self, req: ThreadRequest, ) -> Result<ThreadResponse>
pub async fn handle_prompt( &mut self, req: PromptRequest, cli_overrides: &CliRuntimeOverrides, ) -> Result<PromptResponse>
pub async fn invoke_tool( &self, call: ToolCall, approval_mode: AskForApproval, cwd: &Path, ) -> Result<Value>
pub async fn mcp_startup(&self) -> McpStartupCompleteEvent
pub fn app_status(&self) -> AppResponse
pub fn provider_default(&self) -> ProviderKind
pub fn save_thread_checkpoint( &self, thread_id: &str, checkpoint_id: &str, state: &Value, ) -> Result<()>
pub fn load_thread_checkpoint( &self, thread_id: &str, checkpoint_id: Option<&str>, ) -> Result<Option<Value>>
pub fn enqueue_job(&mut self, name: impl Into<String>) -> Result<JobRecord>
pub fn set_job_running(&mut self, job_id: &str) -> Result<()>
pub fn update_job_progress( &mut self, job_id: &str, progress: u8, detail: Option<String>, ) -> Result<()>
pub fn complete_job(&mut self, job_id: &str) -> Result<()>
pub fn fail_job( &mut self, job_id: &str, detail: impl Into<String>, ) -> Result<()>
pub fn cancel_job(&mut self, job_id: &str) -> Result<()>
pub fn pause_job(&mut self, job_id: &str, detail: Option<String>) -> Result<()>
pub fn resume_job(&mut self, job_id: &str, detail: Option<String>) -> Result<()>
pub fn job_history(&self, job_id: &str) -> Vec<JobHistoryEntry>
Auto Trait Implementations§
impl Freeze for Runtime
impl !RefUnwindSafe for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl UnsafeUnpin for Runtime
impl !UnwindSafe for Runtime
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