use aidaemon_tools::services::SettingsStore;
use async_trait::async_trait;
#[async_trait]
pub trait GoalStore: Send + Sync {
async fn create_goal(&self, _goal: &crate::traits::Goal) -> anyhow::Result<()> {
Ok(())
}
async fn get_goal(&self, _id: &str) -> anyhow::Result<Option<crate::traits::Goal>> {
Ok(None)
}
async fn update_goal(&self, _goal: &crate::traits::Goal) -> anyhow::Result<()> {
Ok(())
}
async fn get_active_goals(&self) -> anyhow::Result<Vec<crate::traits::Goal>> {
Ok(vec![])
}
async fn get_active_personal_goals(
&self,
_limit: i64,
) -> anyhow::Result<Vec<crate::traits::Goal>> {
Ok(vec![])
}
async fn update_personal_goal(
&self,
_goal_id: &str,
_status: Option<&str>,
_progress_note: Option<&str>,
) -> anyhow::Result<()> {
Ok(())
}
async fn get_goals_for_session(
&self,
_session_id: &str,
) -> anyhow::Result<Vec<crate::traits::Goal>> {
Ok(vec![])
}
async fn get_pending_confirmation_goals(
&self,
_session_id: &str,
) -> anyhow::Result<Vec<crate::traits::Goal>> {
Ok(vec![])
}
async fn activate_goal(&self, _goal_id: &str) -> anyhow::Result<bool> {
Ok(false)
}
}
#[async_trait]
pub trait MandateStore: Send + Sync {
async fn create_mandate_controller(
&self,
_goal: &crate::traits::Goal,
_mandate: &crate::traits::Mandate,
) -> anyhow::Result<()> {
anyhow::bail!("mandate controllers are not supported by this store")
}
async fn get_mandate(&self, _id: &str) -> anyhow::Result<Option<crate::traits::Mandate>> {
Ok(None)
}
async fn get_mandate_for_goal(
&self,
_goal_id: &str,
) -> anyhow::Result<Option<crate::traits::Mandate>> {
Ok(None)
}
async fn list_mandates(
&self,
_session_id: Option<&str>,
_include_terminal: bool,
) -> anyhow::Result<Vec<crate::traits::Mandate>> {
Ok(Vec::new())
}
async fn is_mandate_session_authorized(
&self,
_mandate_id: &str,
_session_id: &str,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn record_mandate_objective_measurement(
&self,
_measurement: &crate::traits::MandateObjectiveMeasurement,
) -> anyhow::Result<()> {
anyhow::bail!("mandate objective measurements are not supported by this store")
}
async fn list_mandate_objective_measurements(
&self,
_mandate_id: &str,
_limit: i64,
) -> anyhow::Result<Vec<crate::traits::MandateObjectiveMeasurement>> {
Ok(Vec::new())
}
async fn update_mandate(&self, _mandate: &crate::traits::Mandate) -> anyhow::Result<()> {
anyhow::bail!("mandates are not supported by this store")
}
async fn confirm_mandate(
&self,
_mandate_id: &str,
_expected_version: i64,
_activation_duration_secs: Option<i64>,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn transition_mandate_status(
&self,
_mandate_id: &str,
_from_status: crate::traits::MandateStatus,
_to_status: crate::traits::MandateStatus,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn resume_mandate_with_context(
&self,
_mandate_id: &str,
_from_status: crate::traits::MandateStatus,
_expected_version: i64,
_controller_context: Option<&str>,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn record_active_mandate_owner_guidance(
&self,
_mandate_id: &str,
_expected_version: i64,
_owner_session: &str,
_controller_context: &str,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn create_mandate_review_run(
&self,
_mandate_id: &str,
_review_lease_token: &str,
_goal_run_id: &str,
_root_task: &crate::traits::Task,
) -> anyhow::Result<crate::traits::GoalRun> {
anyhow::bail!("mandate review runs are not supported by this store")
}
async fn keep_mandate_controller_active(
&self,
_mandate_id: &str,
_expected_version: i64,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn claim_due_mandates(
&self,
_limit: i64,
_lease_owner: &str,
_lease_secs: i64,
) -> anyhow::Result<Vec<crate::traits::Mandate>> {
Ok(Vec::new())
}
async fn release_mandate_review_lease(
&self,
_mandate_id: &str,
_lease_token: &str,
_retry_at: &str,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn create_mandate_task_from_attempt(
&self,
_task: &crate::traits::Task,
_mandate_id: &str,
_mandate_version: i64,
_goal_run_id: &str,
_root_task_attempt_id: &str,
_max_non_root_tasks: i64,
) -> anyhow::Result<bool> {
Ok(false)
}
#[allow(clippy::too_many_arguments)]
async fn claim_mandate_task_from_attempt(
&self,
_task_id: &str,
_worker_instance_id: &str,
_mandate_id: &str,
_mandate_version: i64,
_goal_run_id: &str,
_root_task_attempt_id: &str,
_lease_secs: i64,
) -> anyhow::Result<Option<crate::traits::TaskAttempt>> {
Ok(None)
}
async fn record_mandate_decision(
&self,
_decision: &crate::traits::MandateDecisionCycle,
_intention: Option<&crate::traits::Intention>,
_task_attempt_id: Option<&str>,
) -> anyhow::Result<()> {
anyhow::bail!("mandate decisions are not supported by this store")
}
async fn record_mandate_decision_with_updates(
&self,
decision: &crate::traits::MandateDecisionCycle,
intention: Option<&crate::traits::Intention>,
operating_updates: Option<&crate::traits::MandateOperatingUpdates>,
task_attempt_id: Option<&str>,
) -> anyhow::Result<()> {
anyhow::ensure!(
operating_updates.is_none_or(
|updates| updates.learning_note.is_none() && updates.action_outcomes.is_empty()
),
"adaptive mandate operating updates are not supported by this store"
);
self.record_mandate_decision(decision, intention, task_attempt_id)
.await
}
async fn get_mandate_decision_for_run(
&self,
_goal_run_id: &str,
) -> anyhow::Result<Option<crate::traits::MandateDecisionCycle>> {
Ok(None)
}
async fn current_run_evidence_receipt_ids(
&self,
_goal_run_id: &str,
_limit: usize,
) -> anyhow::Result<Vec<String>> {
Ok(Vec::new())
}
async fn list_mandate_decisions(
&self,
_mandate_id: &str,
_limit: i64,
) -> anyhow::Result<Vec<crate::traits::MandateDecisionCycle>> {
Ok(Vec::new())
}
async fn list_intentions(
&self,
_mandate_id: &str,
_limit: i64,
) -> anyhow::Result<Vec<crate::traits::Intention>> {
Ok(Vec::new())
}
async fn record_mandate_learning_note(
&self,
_note: &crate::traits::MandateLearningNote,
) -> anyhow::Result<()> {
anyhow::bail!("mandate learning is not supported by this store")
}
async fn list_mandate_learning_notes(
&self,
_mandate_id: &str,
_limit: i64,
) -> anyhow::Result<Vec<crate::traits::MandateLearningNote>> {
Ok(Vec::new())
}
async fn list_mandate_action_outcomes(
&self,
_mandate_id: &str,
_limit: i64,
) -> anyhow::Result<Vec<crate::traits::MandateActionOutcome>> {
Ok(Vec::new())
}
async fn wake_mandates_for_signal(
&self,
_signal: &crate::traits::MandateWakeSignal,
) -> anyhow::Result<Vec<String>> {
Ok(Vec::new())
}
#[allow(clippy::too_many_arguments)]
async fn resolve_mandate_suspension(
&self,
_mandate_id: &str,
_expected_version: i64,
_expected_kind: crate::traits::MandateSuspensionKind,
_controller_context: Option<&str>,
_reconciliation_resolution: Option<crate::traits::MandateReconciliationResolution>,
_owner_guidance: &str,
_owner_session: &str,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn reserve_mandate_action_attempt(
&self,
_reservation: &crate::traits::MandateMutationReservation,
) -> anyhow::Result<Option<crate::traits::MandateMutationAttempt>> {
Ok(None)
}
async fn claim_mandate_mutation_dispatch(
&self,
_claim: &crate::traits::MandateMutationDispatchClaim,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn get_mandate_mutation_quota_state(
&self,
_mandate_id: &str,
_as_of: &str,
) -> anyhow::Result<Option<crate::traits::MandateMutationQuotaState>> {
Ok(None)
}
async fn list_mandate_mutation_attempts_for_run(
&self,
_goal_run_id: &str,
) -> anyhow::Result<Vec<crate::traits::MandateMutationAttempt>> {
Ok(Vec::new())
}
async fn finalize_mandate_run_from_proof(
&self,
_request: &crate::traits::MandateRunFinalizationRequest,
) -> anyhow::Result<crate::traits::MandateRunFinalizationResult> {
Ok(crate::traits::MandateRunFinalizationResult::Rejected {
reason: crate::traits::MandateFinalizationRejectReason::InvalidRequest,
})
}
}
#[async_trait]
pub trait TaskStore: Send + Sync {
async fn create_task(&self, _task: &crate::traits::Task) -> anyhow::Result<()> {
Ok(())
}
async fn get_task(&self, _id: &str) -> anyhow::Result<Option<crate::traits::Task>> {
Ok(None)
}
async fn update_task(&self, _task: &crate::traits::Task) -> anyhow::Result<()> {
Ok(())
}
async fn get_tasks_for_goal(&self, _goal_id: &str) -> anyhow::Result<Vec<crate::traits::Task>> {
Ok(vec![])
}
async fn count_completed_tasks_for_goal(&self, _goal_id: &str) -> anyhow::Result<i64> {
Ok(0)
}
async fn claim_task(&self, _task_id: &str, _agent_id: &str) -> anyhow::Result<bool> {
Ok(false)
}
async fn log_task_activity(
&self,
_activity: &crate::traits::TaskActivity,
) -> anyhow::Result<()> {
Ok(())
}
async fn get_task_activities(
&self,
_task_id: &str,
) -> anyhow::Result<Vec<crate::traits::TaskActivity>> {
Ok(vec![])
}
}
#[async_trait]
pub trait GoalScheduleStore: Send + Sync {
async fn create_goal_schedule(
&self,
_schedule: &crate::traits::GoalSchedule,
) -> anyhow::Result<()> {
Ok(())
}
async fn get_goal_schedule(
&self,
_schedule_id: &str,
) -> anyhow::Result<Option<crate::traits::GoalSchedule>> {
Ok(None)
}
async fn get_schedules_for_goal(
&self,
_goal_id: &str,
) -> anyhow::Result<Vec<crate::traits::GoalSchedule>> {
Ok(vec![])
}
async fn get_due_goal_schedules(
&self,
_limit: i64,
) -> anyhow::Result<Vec<crate::traits::GoalSchedule>> {
Ok(vec![])
}
async fn update_goal_schedule(
&self,
_schedule: &crate::traits::GoalSchedule,
) -> anyhow::Result<()> {
Ok(())
}
async fn delete_goal_schedule(&self, _schedule_id: &str) -> anyhow::Result<bool> {
Ok(false)
}
async fn cancel_stale_pending_confirmation_goals(
&self,
_max_age_secs: i64,
) -> anyhow::Result<u64> {
Ok(0)
}
async fn get_scheduled_goals(&self) -> anyhow::Result<Vec<crate::traits::Goal>> {
Ok(vec![])
}
async fn get_goals_with_open_scheduled_runs(&self) -> anyhow::Result<Vec<crate::traits::Goal>> {
Ok(vec![])
}
async fn get_unscheduled_active_goals(&self) -> anyhow::Result<Vec<crate::traits::Goal>> {
Ok(vec![])
}
}
#[async_trait]
pub trait GoalBudgetStore: Send + Sync {
async fn reset_daily_token_budgets(&self) -> anyhow::Result<u64> {
Ok(0)
}
async fn set_goal_budgets(
&self,
_goal_id: &str,
_budget_per_check: Option<i64>,
_budget_daily: Option<i64>,
) -> anyhow::Result<()> {
Ok(())
}
async fn add_goal_tokens_and_get_budget_status(
&self,
_goal_id: &str,
_delta_tokens: i64,
) -> anyhow::Result<Option<crate::traits::GoalTokenBudgetStatus>> {
Ok(None)
}
}
#[async_trait]
pub trait ScheduledRunStore: Send + Sync {
async fn upsert_scheduled_run_state(
&self,
_state: &crate::traits::ScheduledRunState,
) -> anyhow::Result<()> {
Ok(())
}
async fn get_scheduled_run_state(
&self,
_goal_id: &str,
) -> anyhow::Result<Option<crate::traits::ScheduledRunState>> {
Ok(None)
}
async fn get_scheduled_recovery_state(
&self,
_goal_id: &str,
) -> anyhow::Result<Option<crate::traits::ScheduledRecoveryState>> {
Ok(None)
}
async fn list_escalated_recovery_candidates(
&self,
_cooldown_secs: i64,
_max_attempts: u16,
) -> anyhow::Result<Vec<crate::traits::ScheduledRecoveryState>> {
Ok(Vec::new())
}
async fn record_scheduled_recovery_attempt(&self, _goal_id: &str) -> anyhow::Result<()> {
Ok(())
}
async fn delete_scheduled_run_state(&self, _goal_id: &str) -> anyhow::Result<bool> {
Ok(false)
}
}
#[async_trait]
pub trait TaskDispatchStore: Send + Sync {
async fn get_pending_tasks_by_priority(
&self,
_limit: i64,
) -> anyhow::Result<Vec<crate::traits::Task>> {
Ok(vec![])
}
async fn get_stuck_tasks(
&self,
_timeout_secs: i64,
) -> anyhow::Result<Vec<crate::traits::Task>> {
Ok(vec![])
}
async fn get_recently_completed_tasks(
&self,
_since: &str,
) -> anyhow::Result<Vec<crate::traits::Task>> {
Ok(vec![])
}
async fn mark_task_interrupted(&self, _task_id: &str) -> anyhow::Result<bool> {
Ok(false)
}
}
#[async_trait]
pub trait WorkCoordinationStore: Send + Sync {
async fn create_work_project(
&self,
_name: &str,
_description: Option<&str>,
) -> anyhow::Result<crate::traits::WorkProject> {
anyhow::bail!("work projects are not supported by this store")
}
async fn list_work_projects(&self) -> anyhow::Result<Vec<crate::traits::WorkProject>> {
Ok(vec![])
}
async fn get_session_work_project(&self, _session_id: &str) -> anyhow::Result<String> {
Ok(crate::traits::DEFAULT_PROJECT_ID.to_string())
}
async fn update_work_project(
&self,
_id: &str,
_name: Option<&str>,
_path: Option<Option<&str>>,
) -> anyhow::Result<Option<crate::traits::WorkProject>> {
anyhow::bail!("work projects are not supported by this store")
}
async fn delete_work_project(&self, _id: &str) -> anyhow::Result<bool> {
anyhow::bail!("work projects are not supported by this store")
}
async fn session_work_projects(&self) -> anyhow::Result<Vec<(String, String)>> {
Ok(vec![])
}
async fn set_session_work_project(
&self,
_session_id: &str,
_project_id: &str,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn channel_work_projects(&self) -> anyhow::Result<Vec<(String, String)>> {
Ok(vec![])
}
async fn set_channel_work_project(
&self,
_channel: &str,
_project_id: Option<&str>,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn place_chat_by_channel(
&self,
_session_id: &str,
_channel: &str,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn enqueue_scheduled_occurrence(
&self,
_schedule: &crate::traits::GoalSchedule,
_next_run_at: &str,
_goal: &crate::traits::Goal,
_root: &crate::traits::Task,
_effective_daily_budget: Option<i64>,
) -> anyhow::Result<Option<crate::traits::GoalRun>> {
anyhow::bail!("atomic scheduled occurrences are not supported by this store")
}
async fn start_goal_run(
&self,
_goal_id: &str,
_trigger_type: &str,
_schedule_id: Option<&str>,
_root_task_id: Option<&str>,
) -> anyhow::Result<crate::traits::GoalRun> {
anyhow::bail!("goal runs are not supported by this store")
}
async fn record_missed_goal_run(
&self,
_goal_id: &str,
_schedule_id: Option<&str>,
_due_at: &str,
_summary: &str,
) -> anyhow::Result<crate::traits::GoalRun> {
anyhow::bail!("goal runs are not supported by this store")
}
async fn get_current_goal_run(
&self,
_goal_id: &str,
) -> anyhow::Result<Option<crate::traits::GoalRun>> {
Ok(None)
}
async fn get_goal_runs(&self, _goal_id: &str) -> anyhow::Result<Vec<crate::traits::GoalRun>> {
Ok(vec![])
}
async fn get_goal_run_for_task(
&self,
_task_id: &str,
) -> anyhow::Result<Option<crate::traits::GoalRun>> {
Ok(None)
}
async fn get_tasks_for_goal_run(
&self,
_run_id: &str,
) -> anyhow::Result<Vec<crate::traits::Task>> {
Ok(vec![])
}
async fn finish_goal_run(
&self,
_run_id: &str,
_status: &str,
_summary: Option<&str>,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn claim_task_with_lease(
&self,
_task_id: &str,
_worker_instance_id: &str,
_worker_profile_id: Option<&str>,
_lease_secs: i64,
) -> anyhow::Result<Option<crate::traits::TaskAttempt>> {
Ok(None)
}
async fn get_current_task_attempt(
&self,
_task_id: &str,
) -> anyhow::Result<Option<crate::traits::TaskAttempt>> {
Ok(None)
}
async fn bind_task_attempt_worker(
&self,
_attempt_id: &str,
_lease_token: &str,
_worker_instance_id: &str,
_worker_profile_id: Option<&str>,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn heartbeat_task_attempt(
&self,
_attempt_id: &str,
_lease_token: &str,
_lease_secs: i64,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn patch_task_from_attempt(
&self,
_attempt_id: &str,
_lease_token: &str,
_patch: &crate::traits::TaskAttemptPatch,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn expire_attempts_of_previous_instance(
&self,
_started_before: &str,
) -> anyhow::Result<u64> {
Ok(0)
}
async fn scheduled_restart_replay_candidates(&self) -> anyhow::Result<Vec<(String, String)>> {
Ok(vec![])
}
async fn goal_run_worker_sessions(&self, _goal_run_id: &str) -> anyhow::Result<Vec<String>> {
anyhow::bail!("this store does not record attempt worker sessions")
}
async fn replay_effect_free_scheduled_attempt(
&self,
_attempt_id: &str,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn journal_live_attempts_stopped_on_request(&self) -> anyhow::Result<u64> {
Ok(0)
}
async fn restart_resume_candidates(&self) -> anyhow::Result<Vec<(String, String)>> {
Ok(vec![])
}
async fn resume_stopped_scheduled_attempt(
&self,
_attempt_id: &str,
_summary: &str,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn recover_expired_task_attempts(&self) -> anyhow::Result<Vec<String>> {
Ok(vec![])
}
async fn goal_run_has_live_attempt(&self, _run_id: &str) -> anyhow::Result<bool> {
Ok(false)
}
async fn append_task_journal(
&self,
_entry: &crate::traits::TaskJournalEntry,
) -> anyhow::Result<()> {
Ok(())
}
async fn get_task_journal(
&self,
_task_id: &str,
_limit: i64,
) -> anyhow::Result<Vec<crate::traits::TaskJournalEntry>> {
Ok(vec![])
}
async fn unblock_task(
&self,
_task_id: &str,
_resolution: &str,
_actor_id: &str,
_source_channel: Option<&str>,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn retry_work_task(
&self,
_task_id: &str,
_actor_id: &str,
_source_channel: Option<&str>,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn cancel_work_task(
&self,
_task_id: &str,
_actor_id: &str,
_source_channel: Option<&str>,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn upsert_worker_profile(
&self,
_profile: &crate::traits::WorkerProfile,
) -> anyhow::Result<()> {
Ok(())
}
async fn get_worker_profile(
&self,
_profile_id: &str,
) -> anyhow::Result<Option<crate::traits::WorkerProfile>> {
Ok(None)
}
async fn list_worker_profiles(
&self,
_project_id: Option<&str>,
) -> anyhow::Result<Vec<crate::traits::WorkerProfile>> {
Ok(vec![])
}
async fn assign_task_worker_profile(
&self,
_task_id: &str,
_profile_id: &str,
_actor_id: &str,
_source_channel: Option<&str>,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn set_task_workspace_policy(
&self,
_task_id: &str,
_policy: &str,
) -> anyhow::Result<bool> {
Ok(false)
}
async fn get_task_workspace_policy(&self, _task_id: &str) -> anyhow::Result<String> {
Ok("shared".to_string())
}
async fn task_workspace_policy_is_explicit(&self, _task_id: &str) -> anyhow::Result<bool> {
Ok(false)
}
async fn create_task_workspace(
&self,
_workspace: &crate::traits::TaskWorkspace,
) -> anyhow::Result<()> {
Ok(())
}
async fn update_task_workspace(
&self,
_workspace: &crate::traits::TaskWorkspace,
) -> anyhow::Result<()> {
Ok(())
}
async fn get_task_workspace(
&self,
_task_id: &str,
) -> anyhow::Result<Option<crate::traits::TaskWorkspace>> {
Ok(None)
}
async fn get_latest_task_handoff(
&self,
_task_id: &str,
) -> anyhow::Result<Option<crate::traits::TaskHandoff>> {
Ok(None)
}
async fn list_work_goals(
&self,
_project_id: &str,
_include_terminal: bool,
_limit: i64,
) -> anyhow::Result<Vec<crate::traits::WorkGoalSummary>> {
Ok(vec![])
}
async fn list_work_tasks(
&self,
_project_id: &str,
_lane: Option<&str>,
_limit: i64,
) -> anyhow::Result<Vec<crate::traits::WorkTaskSummary>> {
Ok(vec![])
}
}
#[async_trait]
pub trait GoalNotificationStore: Send + Sync {
async fn count_active_evergreen_goals(&self) -> anyhow::Result<i64> {
Ok(0)
}
async fn get_goals_needing_notification(&self) -> anyhow::Result<Vec<crate::traits::Goal>> {
Ok(vec![])
}
async fn mark_goal_notified(&self, _goal_id: &str) -> anyhow::Result<()> {
Ok(())
}
async fn cleanup_stale_goals(&self, _stale_hours: i64) -> anyhow::Result<u64> {
Ok(0)
}
}
#[async_trait]
pub trait NotificationStore: Send + Sync {
async fn record_background_spawn(
&self,
_spawn: &crate::traits::BackgroundSpawn,
) -> anyhow::Result<()> {
Ok(())
}
async fn finish_background_spawn(&self, _id: &str) -> anyhow::Result<()> {
Ok(())
}
async fn background_spawns_for_session(
&self,
_session_id: &str,
) -> anyhow::Result<Vec<crate::traits::BackgroundSpawn>> {
Ok(Vec::new())
}
async fn take_background_spawns(&self) -> anyhow::Result<Vec<crate::traits::BackgroundSpawn>> {
Ok(Vec::new())
}
async fn enqueue_notification(
&self,
_entry: &crate::traits::NotificationEntry,
) -> anyhow::Result<()> {
Ok(())
}
async fn enqueue_goal_notification(
&self,
entry: &crate::traits::NotificationEntry,
) -> anyhow::Result<bool> {
self.enqueue_notification(entry).await?;
Ok(true)
}
async fn get_pending_notifications(
&self,
_limit: i64,
) -> anyhow::Result<Vec<crate::traits::NotificationEntry>> {
Ok(vec![])
}
async fn mark_notification_delivered(&self, _notification_id: &str) -> anyhow::Result<()> {
Ok(())
}
async fn increment_notification_attempt(&self, _notification_id: &str) -> anyhow::Result<()> {
Ok(())
}
async fn cleanup_expired_notifications(&self) -> anyhow::Result<i64> {
Ok(0)
}
async fn notices_delivered_since(
&self,
_session_id: &str,
_since: chrono::DateTime<chrono::Utc>,
) -> anyhow::Result<Vec<crate::traits::DeliveredNotice>> {
Ok(Vec::new())
}
}
pub trait MandateToolStore:
MandateStore
+ GoalStore
+ WorkCoordinationStore
+ aidaemon_channels::hub::SessionChannelStore
+ GoalBudgetStore
+ GoalScheduleStore
+ ScheduledRunStore
{
}
impl<T> MandateToolStore for T where
T: MandateStore
+ GoalStore
+ WorkCoordinationStore
+ aidaemon_channels::hub::SessionChannelStore
+ GoalBudgetStore
+ GoalScheduleStore
+ ScheduledRunStore
{
}
pub trait GoalTraceStore:
GoalStore + GoalScheduleStore + MandateStore + TaskStore + WorkCoordinationStore + ScheduledRunStore
{
}
impl<T> GoalTraceStore for T where
T: GoalStore
+ GoalScheduleStore
+ MandateStore
+ TaskStore
+ WorkCoordinationStore
+ ScheduledRunStore
{
}
pub trait ManageGoalTasksStore:
GoalStore + TaskStore + MandateStore + WorkCoordinationStore + NotificationStore
{
}
impl<T> ManageGoalTasksStore for T where
T: GoalStore + TaskStore + MandateStore + WorkCoordinationStore + NotificationStore
{
}
pub trait AutomationStore:
MandateToolStore + ScheduledGoalRunsStore + GoalNotificationStore
{
}
impl<T> AutomationStore for T where
T: MandateToolStore + ScheduledGoalRunsStore + GoalNotificationStore
{
}
pub trait ReportBlockerStore:
TaskStore + GoalStore + NotificationStore + WorkCoordinationStore
{
}
impl<T> ReportBlockerStore for T where
T: TaskStore + GoalStore + NotificationStore + WorkCoordinationStore
{
}
pub trait ScheduledGoalRunsStore:
GoalStore
+ GoalScheduleStore
+ ScheduledRunStore
+ GoalBudgetStore
+ TaskStore
+ WorkCoordinationStore
+ SettingsStore
+ MandateStore
{
}
impl<T> ScheduledGoalRunsStore for T where
T: GoalStore
+ GoalScheduleStore
+ ScheduledRunStore
+ GoalBudgetStore
+ TaskStore
+ WorkCoordinationStore
+ SettingsStore
+ MandateStore
{
}
#[async_trait]
pub trait HealthCheckStore: Send + Sync {
async fn health_check(&self) -> anyhow::Result<()> {
Ok(())
}
}