Skip to main content

SessionBackend

Trait SessionBackend 

Source
pub trait SessionBackend: Send + Sync {
Show 41 methods // Required methods fn create_session<'life0, 'async_trait>( &'life0 self, request: CreateSessionRequest, ) -> Pin<Box<dyn Future<Output = Result<SessionId, SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_session<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<Option<Session>, SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn send_message<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, message: String, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn submit_durable_message<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, request: DurableMessageRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn answer_questions<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, request: AnswerQuestionsRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn cancel_session<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn merge_session<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn create_review_request<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<ReviewRequest, SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; // Provided methods fn supports(&self, operation: SessionOperation) -> bool { ... } fn generate_graph_proposal<'life0, 'async_trait>( &'life0 self, request: GenerateGraphProposalRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_graph_proposal<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<GraphProposalState>, SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn act_on_graph_proposal<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, version: u32, action: GraphProposalAction, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_execution_graph<'life0, 'life1, 'async_trait>( &'life0 self, graph_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<ExecutionGraphProgress>, SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn session_graphs<'life0, 'async_trait>( &'life0 self, request: SessionGraphsRequest, ) -> Pin<Box<dyn Future<Output = Result<SessionGraphs, SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn act_on_session_graph<'life0, 'async_trait>( &'life0 self, request: SessionGraphActionRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn cancel_execution_graph<'life0, 'async_trait>( &'life0 self, request: GraphControlRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn resume_execution_graph<'life0, 'async_trait>( &'life0 self, request: ResumeExecutionGraphRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn extend_execution_graph_budget<'life0, 'async_trait>( &'life0 self, request: ExtendGraphBudgetRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn continue_execution_graph_node<'life0, 'async_trait>( &'life0 self, request: ContinueGraphNodeRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn start_execution_graph<'life0, 'async_trait>( &'life0 self, request: StartExecutionGraphRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn accept_execution_graph_result<'life0, 'async_trait>( &'life0 self, reference: GraphResultRef, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn submit_agent_task<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, request: SubmitAgentTaskRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_agent_task_history<'life0, 'life1, 'async_trait>( &'life0 self, task_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<TaskAgentHistory>, SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn accept_agent_plan<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _request: AcceptTaskPlanRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn create_task<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _request: CreateTaskRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn list_tasks<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<Vec<Task>, SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn submit_task<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _request: SubmitTaskRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_task<'life0, 'life1, 'async_trait>( &'life0 self, _task_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Task>, SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn complete_task<'life0, 'life1, 'async_trait>( &'life0 self, _task_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn host_context<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HostContext, SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn project_status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HostProjectStatus, SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn sync_project<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_session_diff<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<SessionDiffFile>>, SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn list_session_files<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<SessionFileEntry>>, SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn list_project_files<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<SessionFileEntry>, SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn list_sessions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<SessionSummary>, SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn list_session_entries<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<SessionListEntry>, SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn send_message_with_images<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, message: String, images: Vec<MessageImage>, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn stop_turn<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn rebase_session<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn update_session_settings<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, change: SessionSettingsChange, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... }
}
Expand description

Host implementation boundary for session persistence and workflows.

The trait is object-safe so agent loops and background workflows can hold a programmatic session capability without depending on a concrete frontend.

Required Methods§

Source

fn create_session<'life0, 'async_trait>( &'life0 self, request: CreateSessionRequest, ) -> Pin<Box<dyn Future<Output = Result<SessionId, SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Creates one session and returns its stable identifier.

Source

fn get_session<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<Option<Session>, SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Loads one complete session aggregate, including settings and messages.

Source

fn send_message<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, message: String, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Sends one text message, starting, resuming, or queueing as appropriate.

Source

fn submit_durable_message<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, request: DurableMessageRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Submits a durable turn without entering the lossy live-chat queue used while an ordinary user turn is active.

Source

fn answer_questions<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, request: AnswerQuestionsRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Answers the complete current clarification-question set.

Source

fn cancel_session<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Cancels one session through the host lifecycle workflow.

Source

fn merge_session<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Requests merge processing for one review-ready session.

Source

fn create_review_request<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<ReviewRequest, SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Queues publication of one session branch and creates or refreshes its review request.

Provided Methods§

Source

fn supports(&self, operation: SessionOperation) -> bool

Reports whether the host serves operation to frontends that ask first. Hosts serve none unless they opt in.

Source

fn generate_graph_proposal<'life0, 'async_trait>( &'life0 self, request: GenerateGraphProposalRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reserves generation without waiting for model completion.

Source

fn get_graph_proposal<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<GraphProposalState>, SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Reads retained state without generating or launching work.

Source

fn act_on_graph_proposal<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, version: u32, action: GraphProposalAction, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Applies an explicit action to the exact inspected version.

Source

fn get_execution_graph<'life0, 'life1, 'async_trait>( &'life0 self, graph_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<ExecutionGraphProgress>, SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Reads durable progress without launching or retrying work.

Source

fn session_graphs<'life0, 'async_trait>( &'life0 self, request: SessionGraphsRequest, ) -> Pin<Box<dyn Future<Output = Result<SessionGraphs, SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reads a session’s graphs, its latest proposal, and the selected graph’s live progress and outputs, without launching or changing any work.

Source

fn act_on_session_graph<'life0, 'async_trait>( &'life0 self, request: SessionGraphActionRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Applies one inspector action to a session’s graph, as the host’s own inspector would with the same node or output selected, only while the graph still matches the snapshot the action was chosen from.

Source

fn cancel_execution_graph<'life0, 'async_trait>( &'life0 self, request: GraphControlRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Closes graph admission durably, then signals its owned workers.

Source

fn resume_execution_graph<'life0, 'async_trait>( &'life0 self, request: ResumeExecutionGraphRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Explicitly restarts dispatch without replaying admitted executions.

Source

fn extend_execution_graph_budget<'life0, 'async_trait>( &'life0 self, request: ExtendGraphBudgetRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Records an explicit increase of one budget’s provider calls, then releases nodes waiting for that credit.

Source

fn continue_execution_graph_node<'life0, 'async_trait>( &'life0 self, request: ContinueGraphNodeRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Authorizes one new attempt against an exact failed/question execution.

Source

fn start_execution_graph<'life0, 'async_trait>( &'life0 self, request: StartExecutionGraphRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Saves and starts a static graph. Existing admitted nodes are never replayed. Named budgets are fixed at first launch and their spending is recorded durably, so relaunching never replenishes them.

Source

fn accept_execution_graph_result<'life0, 'async_trait>( &'life0 self, reference: GraphResultRef, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Records explicit acceptance of an exact graph output and wakes ready dependents. Model output must never call this trusted host boundary.

Source

fn submit_agent_task<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, request: SubmitAgentTaskRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Admits a role-bound attempt with its own isolated conversation.

Source

fn get_agent_task_history<'life0, 'life1, 'async_trait>( &'life0 self, task_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<TaskAgentHistory>, SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Reads isolated task responses without exposing host storage types.

Source

fn accept_agent_plan<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _request: AcceptTaskPlanRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Explicitly accepts a standalone Planner response by producing version.

Source

fn create_task<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _request: CreateTaskRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Persists an outcome without execution. Older hosts may omit support.

Source

fn list_tasks<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<Vec<Task>, SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Lists a session’s tasks, including unattempted and completed outcomes.

Source

fn submit_task<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _request: SubmitTaskRequest, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Admits an explicit task attempt. Older hosts may omit task support.

Source

fn get_task<'life0, 'life1, 'async_trait>( &'life0 self, _task_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Task>, SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Loads the desired outcome and retained attempt history.

Source

fn complete_task<'life0, 'life1, 'async_trait>( &'life0 self, _task_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Explicitly accepts the task outcome after all attempts have settled.

Source

fn host_context<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HostContext, SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Describes the active project new sessions are created in. Older hosts may omit it.

Source

fn project_status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HostProjectStatus, SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reports the active project’s branch, its distance from upstream, and its latest explicit sync. Older hosts may omit it.

Source

fn sync_project<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Starts or queues a sync of the active project’s branch with its upstream: a pull with rebase, then a push, with agent-assisted conflict resolution. The host acknowledges admission and reports progress through Self::project_status. Older hosts may omit support.

Source

fn get_session_diff<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<SessionDiffFile>>, SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Loads the files a session changes against its base branch, or None when the host has not loaded the session. Hosts that do not serve diffs report it as an error.

Source

fn list_session_files<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<SessionFileEntry>>, SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Lists the files and directories in a session’s worktree, directories first, or None when the host has not loaded the session. Hosts that do not serve file listings report it as an error.

Source

fn list_project_files<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<SessionFileEntry>, SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lists the files and directories in the active project’s checkout, directories first. Hosts that do not serve project file listings report it as an error.

Source

fn list_sessions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<SessionSummary>, SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lists the host’s loaded sessions in its display order. Older hosts may omit listing support.

Source

fn list_session_entries<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<SessionListEntry>, SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lists the host’s loaded sessions in its display order, with the figures a dense list shows. Hosts that do not provide them return Self::list_sessions without stats.

Source

fn send_message_with_images<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, message: String, images: Vec<MessageImage>, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Sends one message with images, which the host stores itself and attaches as [Image #n], numbered in images order from 1. A placeholder message lacks is appended to it. Older hosts may omit support.

Source

fn stop_turn<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Stops the session’s running turn and returns the session to review, keeping its worktree and changes. Older hosts may omit support.

Source

fn rebase_session<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Starts or queues a rebase of the session branch onto its base branch; a conflict starts an agent-assisted resolution turn. Older hosts may omit support.

Source

fn update_session_settings<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, change: SessionSettingsChange, ) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Changes the session’s settings for later turns. A model or speed change waits while the session still has accepted work. Older hosts may omit support.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§