pub struct DurableThread { /* private fields */ }Implementations§
Source§impl DurableThread
impl DurableThread
pub fn recover( session: Session, kmap: Arc<K1AccessKmap>, ) -> Result<Self, String>
pub fn boxes(&self) -> &[ChatBox]
pub fn events(&self) -> Vec<EventRecord>
pub fn status(&self) -> Status
pub fn accept_box( &mut self, box_type: String, contents: String, hidden_type: String, hidden_contents: String, ) -> Result<(), String>
pub fn accept_external_box( &mut self, box_type: String, contents: String, hidden_type: String, hidden_contents: String, ) -> Result<(), TransitionError>
pub fn accept_startup_context( &mut self, context: AccessContext, profile_id: ProfileId, policy: AccessPolicy, items: Vec<StartupContextItem>, ) -> Result<(), TransitionError>
pub fn accept_user( &mut self, context: AccessContext, profile_id: ProfileId, policy: AccessPolicy, contents: String, ) -> Result<(), TransitionError>
pub fn accept_return( &mut self, id: ToolCallId, result: Result<String, String>, ) -> Result<(), String>
pub fn prepare_stage( &mut self, job: u64, text: String, boxes: Vec<BoxValue>, ) -> Result<Vec<PreparedCall>, String>
pub fn launch_action( &mut self, name: &str, arguments: &str, ) -> Result<String, String>
pub fn accept_tool_message( &mut self, id: ToolCallId, contents: String, ) -> Result<(), String>
pub fn accept_tool_return( &mut self, id: ToolCallId, result: Result<String, String>, ) -> Result<(), String>
pub fn accept_tool_return_v2( &mut self, id: ToolCallId, result: Result<String, String>, metadata_type: String, metadata_contents: String, ) -> Result<(), String>
pub fn prepare_mailbox_flush( &mut self, job: u64, ) -> Result<Option<PreparedMailboxFlush>, String>
pub fn prepared_input( &self, prepared: &PreparedMailboxFlush, ) -> Result<String, String>
pub fn commit_mailbox_flush( &mut self, prepared: PreparedMailboxFlush, ) -> Result<(), String>
pub fn begin_input(&mut self) -> Result<Option<(u64, String)>, String>
pub fn complete( &mut self, job: u64, output: ShimOutput<BoxValue>, ) -> Result<bool, String>
pub fn complete_with_terminal_response( &mut self, job: u64, output: ShimOutput<BoxValue>, ) -> Result<(bool, u64), String>
pub fn record_model_usage( &mut self, connected_box_id: u64, usage: ModelUsage, ) -> Result<(), String>
pub fn fail(&mut self, job: u64, error: String, restartable: bool)
pub fn restart( &mut self, context: AccessContext, profile_id: ProfileId, policy: AccessPolicy, ) -> Result<(), TransitionError>
Auto Trait Implementations§
impl Freeze for DurableThread
impl RefUnwindSafe for DurableThread
impl Send for DurableThread
impl Sync for DurableThread
impl Unpin for DurableThread
impl UnsafeUnpin for DurableThread
impl UnwindSafe for DurableThread
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