pub trait SessionRepository: Send + Sync {
Show 57 methods
// Required methods
fn append_session_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
kind: SessionMessageKind,
content: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn backfill_session_project<'life0, 'async_trait>(
&'life0 self,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_session<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_session_base_branch<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_session_parent_session_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_session_stack_base_commit_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_session_instruction_conversation_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_session_provider_conversation_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn insert_draft_session<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
id: &'life1 str,
model: &'life2 str,
base_branch: &'life3 str,
status: &'life4 str,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn insert_stacked_draft_session<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
id: &'life1 str,
model: &'life2 str,
base_branch: &'life3 str,
status: &'life4 str,
parent_session_id: &'life5 str,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait;
fn insert_session<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
id: &'life1 str,
model: &'life2 str,
base_branch: &'life3 str,
status: &'life4 str,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn insert_session_with_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
session: PersistedSessionCreation<'life1>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn fork_session_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot: ForkSessionSnapshot<'life1>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionRow>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_active_session_agent_models<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionAgentModelRow>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn load_sessions_for_project<'life0, 'async_trait>(
&'life0 self,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionListRow>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn load_session_detail<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionDetailRow>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_session_messages<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionMessageRow>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_session_focused_reviews_for_project<'life0, 'async_trait>(
&'life0 self,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionFocusedReviewRow>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn load_sessions_metadata<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(i64, i64), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn load_session_project_id<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<i64>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_session_personality_state<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionPersonalityState>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_pending_stack_restack_session_ids<'life0, 'async_trait>(
&'life0 self,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn load_session_published_upstream_ref<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_session_merged_commit_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_session_archived_diff<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn restack_child_sessions_after_parent_merge<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
parent_session_id: &'life1 str,
base_branch: &'life2 str,
parent_commit_hash: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn load_session_reasoning_level<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ReasoningLevel, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_session_speed_mode<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<SpeedMode, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_session_summary<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_session_timestamps<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<(i64, i64)>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn persist_session_turn_metadata<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
turn_metadata: &'life2 SessionTurnMetadata,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn mark_session_diff_unknown<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_session_diff_stats<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
added_lines: u64,
deleted_lines: u64,
has_diff: bool,
id: &'life1 str,
size: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update_session_instruction_conversation_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
provider_conversation_id: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_session_model<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
model: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update_session_personality_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
personality_id: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_session_agent_model<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 str,
agent: &'life2 str,
model: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn update_active_session_agent_model<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 str,
agent: &'life2 str,
model: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn clear_session_draft_flag<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_session_merged_commit_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
merged_commit_hash: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_session_archived_diff<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
archived_diff: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_session_stack_base_commit_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
stack_base_commit_hash: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_session_prompt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
prompt: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update_session_provider_conversation_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
provider_conversation_id: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_session_questions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
questions: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update_session_reasoning_level<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
reasoning_level: ReasoningLevel,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_session_speed_mode<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
speed_mode: SpeedMode,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_session_published_upstream_ref<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
published_upstream_ref: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_session_stats<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
stats: &'life2 SessionStats,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update_session_status_with_timing_at<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
status: &'life2 str,
timestamp_seconds: i64,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update_session_summary<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
summary: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update_session_focused_review<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
status: Option<FocusedReviewStatus>,
diff_hash: Option<String>,
text: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_session_title<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
title: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update_session_provisional_title<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
title: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn begin_session_title_generation<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
requires_provisional_title: bool,
) -> Pin<Box<dyn Future<Output = Result<Option<i64>, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_session_title_for_generation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
expected_generation: i64,
title: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, DbError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Session-focused persistence boundary used by app orchestration and tests.
Required Methods§
Sourcefn append_session_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
kind: SessionMessageKind,
content: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn append_session_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
kind: SessionMessageKind,
content: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Appends one typed transcript message and refreshes session ordering metadata.
Sourcefn backfill_session_project<'life0, 'async_trait>(
&'life0 self,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn backfill_session_project<'life0, 'async_trait>(
&'life0 self,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sets project_id for sessions that do not yet reference a project.
Sourcefn delete_session<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_session<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deletes a session row by identifier.
Sourcefn get_session_base_branch<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_session_base_branch<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns the persisted base branch for a session, when present.
Sourcefn get_session_parent_session_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_session_parent_session_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns the parent session id for a stacked session, when present.
Sourcefn get_session_stack_base_commit_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_session_stack_base_commit_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns the parent/base commit hash that a stacked child branch was last known to contain.
Sourcefn get_session_instruction_conversation_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_session_instruction_conversation_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns the persisted app-server instruction bootstrap marker for a session, when present.
Sourcefn get_session_provider_conversation_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_session_provider_conversation_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns the provider conversation identifier for a session, when present.
Sourcefn insert_draft_session<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
id: &'life1 str,
model: &'life2 str,
base_branch: &'life3 str,
status: &'life4 str,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn insert_draft_session<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
id: &'life1 str,
model: &'life2 str,
base_branch: &'life3 str,
status: &'life4 str,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Inserts a newly created draft-session row.
Sourcefn insert_stacked_draft_session<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
id: &'life1 str,
model: &'life2 str,
base_branch: &'life3 str,
status: &'life4 str,
parent_session_id: &'life5 str,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn insert_stacked_draft_session<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
id: &'life1 str,
model: &'life2 str,
base_branch: &'life3 str,
status: &'life4 str,
parent_session_id: &'life5 str,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Inserts a newly created stacked draft-session row.
Sourcefn insert_session<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
id: &'life1 str,
model: &'life2 str,
base_branch: &'life3 str,
status: &'life4 str,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn insert_session<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
id: &'life1 str,
model: &'life2 str,
base_branch: &'life3 str,
status: &'life4 str,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Inserts a newly created session row.
Sourcefn insert_session_with_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
session: PersistedSessionCreation<'life1>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn insert_session_with_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
session: PersistedSessionCreation<'life1>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Inserts a newly created session row with explicit provider identity.
Sourcefn fork_session_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot: ForkSessionSnapshot<'life1>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fork_session_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot: ForkSessionSnapshot<'life1>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Inserts a new session by snapshotting source metadata and ordered transcript messages while clearing source-specific runtime linkage.
Sourcefn load_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionRow>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionRow>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads one complete persisted session row by stable identifier.
Sourcefn load_active_session_agent_models<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionAgentModelRow>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_active_session_agent_models<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionAgentModelRow>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads provider/model metadata for every non-terminal session across projects.
Sourcefn load_sessions_for_project<'life0, 'async_trait>(
&'life0 self,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionListRow>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_sessions_for_project<'life0, 'async_trait>(
&'life0 self,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionListRow>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads lightweight session-list metadata ordered by most recent update for one project.
Sourcefn load_session_detail<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionDetailRow>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_session_detail<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionDetailRow>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads transcript-scale detail for one session when it becomes active.
Sourcefn load_session_messages<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionMessageRow>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_session_messages<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionMessageRow>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads ordered transcript messages for one session.
Sourcefn load_session_focused_reviews_for_project<'life0, 'async_trait>(
&'life0 self,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionFocusedReviewRow>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_session_focused_reviews_for_project<'life0, 'async_trait>(
&'life0 self,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionFocusedReviewRow>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads persisted focused-review cache rows for one project.
Sourcefn load_sessions_metadata<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(i64, i64), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_sessions_metadata<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(i64, i64), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads lightweight session metadata used for cheap change detection.
Sourcefn load_session_project_id<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<i64>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_session_project_id<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<i64>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads the project identifier associated with one session.
Sourcefn load_session_personality_state<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionPersonalityState>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_session_personality_state<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionPersonalityState>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads selected and last-applied personality state for one session.
Sourcefn load_pending_stack_restack_session_ids<'life0, 'async_trait>(
&'life0 self,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_pending_stack_restack_session_ids<'life0, 'async_trait>(
&'life0 self,
project_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads parentless review-ready sessions that still need their recorded stack-base commit replayed onto their current base branch.
Sourcefn load_session_published_upstream_ref<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_session_published_upstream_ref<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns the persisted upstream reference for a published session branch, when present.
Sourcefn load_session_merged_commit_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_session_merged_commit_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads the persisted merged commit hash for one session, when present.
Sourcefn load_session_archived_diff<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_session_archived_diff<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads the immutable diff archived before managed-session cleanup.
Sourcefn restack_child_sessions_after_parent_merge<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
parent_session_id: &'life1 str,
base_branch: &'life2 str,
parent_commit_hash: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn restack_child_sessions_after_parent_merge<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
parent_session_id: &'life1 str,
base_branch: &'life2 str,
parent_commit_hash: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Clears parent links for children after their parent session merges into its base branch, returning materialized children that may need a follow-up branch restack.
Sourcefn load_session_reasoning_level<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ReasoningLevel, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_session_reasoning_level<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ReasoningLevel, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads the persisted session reasoning level.
Sourcefn load_session_speed_mode<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<SpeedMode, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_session_speed_mode<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<SpeedMode, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads the persisted session response-speed preference.
Sourcefn load_session_summary<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_session_summary<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads the persisted summary text associated with one session.
Sourcefn load_session_timestamps<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<(i64, i64)>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_session_timestamps<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<(i64, i64)>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns (created_at, updated_at) timestamps for a session.
Sourcefn persist_session_turn_metadata<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
turn_metadata: &'life2 SessionTurnMetadata,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn persist_session_turn_metadata<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
turn_metadata: &'life2 SessionTurnMetadata,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Persists all canonical turn metadata for one completed agent turn in a single transaction.
Sourcefn mark_session_diff_unknown<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn mark_session_diff_unknown<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Marks persisted diff availability unknown while retaining the last known size and line counts.
Sourcefn update_session_diff_stats<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
added_lines: u64,
deleted_lines: u64,
has_diff: bool,
id: &'life1 str,
size: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_session_diff_stats<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
added_lines: u64,
deleted_lines: u64,
has_diff: bool,
id: &'life1 str,
size: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Updates persisted diff-derived presence, size, and line-count fields for a session row.
Sourcefn update_session_instruction_conversation_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
provider_conversation_id: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_session_instruction_conversation_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
provider_conversation_id: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Updates the persisted app-server instruction bootstrap marker for a session.
Sourcefn update_session_model<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
model: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_session_model<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
model: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Updates the persisted model for a session.
Sourcefn update_session_personality_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
personality_id: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_session_personality_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
personality_id: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Updates or clears the personality selected for future turns.
Sourcefn update_session_agent_model<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 str,
agent: &'life2 str,
model: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn update_session_agent_model<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 str,
agent: &'life2 str,
model: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Updates the persisted agent provider and model for a session.
Sourcefn update_active_session_agent_model<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 str,
agent: &'life2 str,
model: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn update_active_session_agent_model<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 str,
agent: &'life2 str,
model: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Updates the persisted agent provider and model only while the session remains non-terminal, without changing its activity timestamp.
Sourcefn clear_session_draft_flag<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn clear_session_draft_flag<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Clears the draft flag for a session row once its staged draft bundle starts the first live turn.
Sourcefn update_session_merged_commit_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
merged_commit_hash: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_session_merged_commit_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
merged_commit_hash: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Updates the persisted merged commit hash for a session row.
Sourcefn update_session_archived_diff<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
archived_diff: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_session_archived_diff<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
archived_diff: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persists or clears the immutable diff retained for archived sessions.
Sourcefn update_session_stack_base_commit_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
stack_base_commit_hash: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_session_stack_base_commit_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
stack_base_commit_hash: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persists or clears the parent/base commit hash used for deterministic stacked-child rebases.
Sourcefn update_session_prompt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
prompt: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_session_prompt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
prompt: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Updates the saved prompt for a session row.
Sourcefn update_session_provider_conversation_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
provider_conversation_id: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_session_provider_conversation_id<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
provider_conversation_id: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Updates the persisted provider conversation identifier for a session.
Sourcefn update_session_questions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
questions: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_session_questions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
questions: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Updates the model clarification questions for a session row.
Sourcefn update_session_reasoning_level<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
reasoning_level: ReasoningLevel,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_session_reasoning_level<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
reasoning_level: ReasoningLevel,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Updates the persisted session reasoning level.
Sourcefn update_session_speed_mode<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
speed_mode: SpeedMode,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_session_speed_mode<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
speed_mode: SpeedMode,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Updates the persisted session response-speed preference.
Sourcefn update_session_published_upstream_ref<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
published_upstream_ref: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_session_published_upstream_ref<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
published_upstream_ref: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Updates the persisted upstream reference for a published session branch.
Sourcefn update_session_stats<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
stats: &'life2 SessionStats,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_session_stats<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
stats: &'life2 SessionStats,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Accumulates token statistics for a session.
Sourcefn update_session_status_with_timing_at<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
status: &'life2 str,
timestamp_seconds: i64,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_session_status_with_timing_at<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
status: &'life2 str,
timestamp_seconds: i64,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Updates the status for a session row and opens or closes the persisted
cumulative active-work interval when crossing the InProgress
boundary.
Sourcefn update_session_summary<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
summary: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_session_summary<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
summary: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Updates the persisted session summary text for a session row.
Sourcefn update_session_focused_review<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
status: Option<FocusedReviewStatus>,
diff_hash: Option<String>,
text: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_session_focused_review<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
status: Option<FocusedReviewStatus>,
diff_hash: Option<String>,
text: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Updates or clears the persisted focused-review cache for a session.
Sourcefn update_session_title<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
title: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_session_title<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
title: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Updates the display title for a session row.
Sourcefn update_session_provisional_title<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
title: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_session_provisional_title<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
title: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Stores a fallback title that can be refined by a later substantive user prompt.
Sourcefn begin_session_title_generation<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
requires_provisional_title: bool,
) -> Pin<Box<dyn Future<Output = Result<Option<i64>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn begin_session_title_generation<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
requires_provisional_title: bool,
) -> Pin<Box<dyn Future<Output = Result<Option<i64>, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Claims the next ordered title candidate for a session.
When requires_provisional_title is true, no candidate is claimed
after a generated or commit-derived title becomes authoritative.
Sourcefn update_session_title_for_generation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
expected_generation: i64,
title: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_session_title_for_generation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
expected_generation: i64,
title: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, DbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Applies one generated title unless a newer candidate or authoritative title has already been accepted.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".