pub struct SqliteWorkStore { /* private fields */ }Expand description
A WorkDatabase on its own pool, for hosts with no store of their own.
Implementations§
Source§impl SqliteWorkStore
impl SqliteWorkStore
Sourcepub fn new(
pool: SqlitePool,
redact: Arc<dyn Fn(&str) -> String + Send + Sync>,
) -> Self
pub fn new( pool: SqlitePool, redact: Arc<dyn Fn(&str) -> String + Send + Sync>, ) -> Self
A store over pool, which already has the tables of crate::schema.
pub fn pool(&self) -> SqlitePool
Trait Implementations§
Source§impl WorkDatabase for SqliteWorkStore
impl WorkDatabase for SqliteWorkStore
Source§fn work_pool(&self) -> &SqlitePool
fn work_pool(&self) -> &SqlitePool
The pool every statement runs on.
Source§fn redact_secrets(&self, text: &str) -> String
fn redact_secrets(&self, text: &str) -> String
Strip secrets from text before it is kept in activity logs, journals
and handoffs.
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteWorkStore
impl !UnwindSafe for SqliteWorkStore
impl Forget for SqliteWorkStore
impl Freeze for SqliteWorkStore
impl Move for SqliteWorkStore
impl Send for SqliteWorkStore
impl Sync for SqliteWorkStore
impl Unpin for SqliteWorkStore
impl UnsafeUnpin for SqliteWorkStorewhere
*const ArcInner<PoolInner<Sqlite>> is !null: UnsafeUnpin,
PhantomData<ArcInner<PoolInner<Sqlite>>>: UnsafeUnpin,
*const ArcInner<dyn Fn(&str) -> String + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn(&str) -> String + Sync + Send>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<S> GoalBudgetStore for Swhere
S: WorkDatabase,
impl<S> GoalBudgetStore for Swhere
S: WorkDatabase,
Source§fn reset_daily_token_budgets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
fn reset_daily_token_budgets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Reset tokens_used_today only for active goals whose usage belongs to a
prior UTC day. Safe to call repeatedly or at process startup.
Source§fn set_goal_budgets<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
budget_per_check: Option<i64>,
budget_daily: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn set_goal_budgets<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
budget_per_check: Option<i64>,
budget_daily: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Update budget columns only.
None = keep current value (COALESCE), NOT “clear to NULL”.
This is a targeted UPDATE that avoids the race with add_goal_tokens_and_get_budget_status()
which atomically increments tokens_used_today — a full update_goal() would clobber that.Source§fn add_goal_tokens_and_get_budget_status<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
delta_tokens: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<GoalTokenBudgetStatus>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn add_goal_tokens_and_get_budget_status<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
delta_tokens: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<GoalTokenBudgetStatus>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Atomically add tokens to a goal’s daily usage counter and return budget status. Read more
Source§impl<S> GoalNotificationStore for Swhere
S: WorkDatabase,
impl<S> GoalNotificationStore for Swhere
S: WorkDatabase,
Source§fn count_active_evergreen_goals<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<i64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
fn count_active_evergreen_goals<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<i64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Count active evergreen (continuous) goals.
Source§fn get_goals_needing_notification<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Goal>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
fn get_goals_needing_notification<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Goal>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Get goals that completed/failed but haven’t been notified to the user yet.
Source§impl<S> GoalScheduleStore for Swhere
S: WorkDatabase,
impl<S> GoalScheduleStore for Swhere
S: WorkDatabase,
Source§fn create_goal_schedule<'life0, 'life1, 'async_trait>(
&'life0 self,
schedule: &'life1 GoalSchedule,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn create_goal_schedule<'life0, 'life1, 'async_trait>(
&'life0 self,
schedule: &'life1 GoalSchedule,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Create a new schedule for a goal.
Source§fn get_goal_schedule<'life0, 'life1, 'async_trait>(
&'life0 self,
schedule_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<GoalSchedule>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn get_goal_schedule<'life0, 'life1, 'async_trait>(
&'life0 self,
schedule_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<GoalSchedule>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Get a schedule by ID.
Source§fn get_schedules_for_goal<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<GoalSchedule>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn get_schedules_for_goal<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<GoalSchedule>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
List schedules for a goal.
Source§fn get_due_goal_schedules<'life0, 'async_trait>(
&'life0 self,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<GoalSchedule>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
fn get_due_goal_schedules<'life0, 'async_trait>(
&'life0 self,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<GoalSchedule>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Get due schedules for active orchestration goals.
Source§fn update_goal_schedule<'life0, 'life1, 'async_trait>(
&'life0 self,
schedule: &'life1 GoalSchedule,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn update_goal_schedule<'life0, 'life1, 'async_trait>(
&'life0 self,
schedule: &'life1 GoalSchedule,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Update a schedule (full replacement).
Source§fn delete_goal_schedule<'life0, 'life1, 'async_trait>(
&'life0 self,
schedule_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn delete_goal_schedule<'life0, 'life1, 'async_trait>(
&'life0 self,
schedule_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Delete a schedule by ID. Returns true if a row was deleted.
Source§fn cancel_stale_pending_confirmation_goals<'life0, 'async_trait>(
&'life0 self,
max_age_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
fn cancel_stale_pending_confirmation_goals<'life0, 'async_trait>(
&'life0 self,
max_age_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Cancel pending-confirmation goals older than max_age_secs.
Source§fn get_scheduled_goals<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Goal>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
fn get_scheduled_goals<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Goal>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Get all orchestration goals that have schedules or are awaiting confirmation.
Source§fn get_unscheduled_active_goals<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Goal>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
fn get_unscheduled_active_goals<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Goal>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Active continuous orchestration goals with no schedule and no mandate
behind them: nothing will ever run them. Listed so they can be seen
and cancelled.
Source§impl<S> GoalStore for Swhere
S: WorkDatabase,
impl<S> GoalStore for Swhere
S: WorkDatabase,
Source§fn create_goal<'life0, 'life1, 'async_trait>(
&'life0 self,
goal: &'life1 Goal,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn create_goal<'life0, 'life1, 'async_trait>(
&'life0 self,
goal: &'life1 Goal,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Create a new goal.
Source§fn get_goal<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Goal>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn get_goal<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Goal>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Get a goal by ID.
Source§fn update_goal<'life0, 'life1, 'async_trait>(
&'life0 self,
goal: &'life1 Goal,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn update_goal<'life0, 'life1, 'async_trait>(
&'life0 self,
goal: &'life1 Goal,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Update a goal (full replacement).
Source§fn get_active_goals<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Goal>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
fn get_active_goals<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Goal>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Get all active orchestration goals (status = “active” or “pending”).
Source§fn get_active_personal_goals<'life0, 'async_trait>(
&'life0 self,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Goal>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
fn get_active_personal_goals<'life0, 'async_trait>(
&'life0 self,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Goal>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Get active personal goals (tracked, never dispatched).
Source§fn update_personal_goal<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
status: Option<&'life2 str>,
progress_note: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
S: 'async_trait,
fn update_personal_goal<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
status: Option<&'life2 str>,
progress_note: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
S: 'async_trait,
Update a personal goal’s status and/or append a progress note.
Source§fn get_goals_for_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Goal>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn get_goals_for_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Goal>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Get orchestration goals for a specific session.
Source§fn get_pending_confirmation_goals<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Goal>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn get_pending_confirmation_goals<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Goal>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Get scheduled goals awaiting confirmation in a session.
Source§fn activate_goal<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn activate_goal<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Activate a pending-confirmation goal.
Returns true when the status transition was applied.
impl<T> GoalTraceStore for Twhere
T: GoalStore + GoalScheduleStore + MandateStore + TaskStore + WorkCoordinationStore + ScheduledRunStore,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> ManageGoalTasksStore for T
Source§impl<S> MandateStore for Swhere
S: WorkDatabase,
impl<S> MandateStore for Swhere
S: WorkDatabase,
Source§fn create_mandate_controller<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
goal: &'life1 Goal,
mandate: &'life2 Mandate,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
S: 'async_trait,
fn create_mandate_controller<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
goal: &'life1 Goal,
mandate: &'life2 Mandate,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
S: 'async_trait,
Atomically create the continuous controller goal and its mandate.
Adaptive review timing lives on the mandate, not in
goal_schedules.fn get_mandate<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Mandate>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn get_mandate_for_goal<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Mandate>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn list_mandates<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: Option<&'life1 str>,
include_terminal: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<Mandate>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Authorize one exact presentation session through the mandate’s stable
principal mapping. Session-string similarity is never sufficient.
Source§fn update_mandate<'life0, 'life1, 'async_trait>(
&'life0 self,
mandate: &'life1 Mandate,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn update_mandate<'life0, 'life1, 'async_trait>(
&'life0 self,
mandate: &'life1 Mandate,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Optimistic owner-policy update.
mandate.version must be exactly one
greater than the currently stored version.Source§fn confirm_mandate<'life0, 'life1, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
expected_version: i64,
activation_duration_secs: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn confirm_mandate<'life0, 'life1, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
expected_version: i64,
activation_duration_secs: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Atomically consume an explicit owner confirmation and activate both the
mandate and its continuous controller. This is the only path that may
turn an unconfirmed mandate into active authority.
Source§fn transition_mandate_status<'life0, 'life1, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
from_status: MandateStatus,
to_status: MandateStatus,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn transition_mandate_status<'life0, 'life1, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
from_status: MandateStatus,
to_status: MandateStatus,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Atomic lifecycle/authority-epoch transition. Implementations must
invalidate open decision runs and stale ACT authority before returning.
Source§fn resume_mandate_with_context<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
from_status: MandateStatus,
expected_version: i64,
controller_context: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
S: 'async_trait,
fn resume_mandate_with_context<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
from_status: MandateStatus,
expected_version: i64,
controller_context: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
S: 'async_trait,
Resume a paused/awaiting-input mandate and update its controller
context in the same expected-version transaction. This prevents owner
guidance from overwriting a concurrent cancel/pause lifecycle state.
Source§fn record_active_mandate_owner_guidance<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
expected_version: i64,
owner_session: &'life2 str,
controller_context: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
S: 'async_trait,
fn record_active_mandate_owner_guidance<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
expected_version: i64,
owner_session: &'life2 str,
controller_context: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
S: 'async_trait,
Record a late owner answer on an active mandate by replacing its
controller context, fenced on the mandate still being active at the
expected version for this owner. Authority is never touched.
Source§fn keep_mandate_controller_active<'life0, 'life1, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
expected_version: i64,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn keep_mandate_controller_active<'life0, 'life1, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
expected_version: i64,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Repair controller runtime state only while the exact mandate authority
epoch is still active. The state check and goal update must be one
atomic database statement so a racing owner pause/cancel wins.
Source§fn wake_mandates_for_signal<'life0, 'life1, 'async_trait>(
&'life0 self,
signal: &'life1 MandateWakeSignal,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn wake_mandates_for_signal<'life0, 'life1, 'async_trait>(
&'life0 self,
signal: &'life1 MandateWakeSignal,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Deduplicate and route one content-free external signal to matching
Autopilot mandates. Matching is structural and cannot widen authority.
Source§fn resolve_mandate_suspension<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
expected_version: i64,
expected_kind: MandateSuspensionKind,
controller_context: Option<&'life2 str>,
reconciliation_resolution: Option<MandateReconciliationResolution>,
owner_guidance: &'life3 str,
owner_session: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
S: 'async_trait,
fn resolve_mandate_suspension<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
expected_version: i64,
expected_kind: MandateSuspensionKind,
controller_context: Option<&'life2 str>,
reconciliation_resolution: Option<MandateReconciliationResolution>,
owner_guidance: &'life3 str,
owner_session: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
S: 'async_trait,
Resolve an awaiting-input state with a typed owner action. Question
answers and external-effect reconciliation are intentionally distinct.
Source§fn record_mandate_objective_measurement<'life0, 'life1, 'async_trait>(
&'life0 self,
measurement: &'life1 MandateObjectiveMeasurement,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn record_mandate_objective_measurement<'life0, 'life1, 'async_trait>(
&'life0 self,
measurement: &'life1 MandateObjectiveMeasurement,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Append one receipt-backed metric observation for the exact current
mandate run and policy version.
fn list_mandate_objective_measurements<'life0, 'life1, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<MandateObjectiveMeasurement>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Source§fn record_mandate_learning_note<'life0, 'life1, 'async_trait>(
&'life0 self,
note: &'life1 MandateLearningNote,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn record_mandate_learning_note<'life0, 'life1, 'async_trait>(
&'life0 self,
note: &'life1 MandateLearningNote,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Persist one bounded, advisory learning note only after all cited
receipts are proven to belong to this mandate.
fn list_mandate_learning_notes<'life0, 'life1, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<MandateLearningNote>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Source§fn list_mandate_action_outcomes<'life0, 'life1, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<MandateActionOutcome>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn list_mandate_action_outcomes<'life0, 'life1, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<MandateActionOutcome>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
The most recent per-action outcomes of a mandate, newest first.
Source§fn create_mandate_review_run<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
review_lease_token: &'life2 str,
goal_run_id: &'life3 str,
root_task: &'life4 Task,
) -> Pin<Box<dyn Future<Output = Result<GoalRun, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
S: 'async_trait,
fn create_mandate_review_run<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
review_lease_token: &'life2 str,
goal_run_id: &'life3 str,
root_task: &'life4 Task,
) -> Pin<Box<dyn Future<Output = Result<GoalRun, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
S: 'async_trait,
Atomically create one mandate review run and its root task under the
caller’s current review lease. A failed root insert must
leave no open run behind.
Source§fn claim_due_mandates<'life0, 'life1, 'async_trait>(
&'life0 self,
limit: i64,
lease_owner: &'life1 str,
lease_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Mandate>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn claim_due_mandates<'life0, 'life1, 'async_trait>(
&'life0 self,
limit: i64,
lease_owner: &'life1 str,
lease_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Mandate>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Claim due reviews with a durable lease. Concurrent callers must never
receive the same mandate before the lease expires.
fn release_mandate_review_lease<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
lease_token: &'life2 str,
retry_at: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
S: 'async_trait,
Source§fn create_mandate_task_from_attempt<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
task: &'life1 Task,
mandate_id: &'life2 str,
mandate_version: i64,
goal_run_id: &'life3 str,
root_task_attempt_id: &'life4 str,
max_non_root_tasks: i64,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
S: 'async_trait,
fn create_mandate_task_from_attempt<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
task: &'life1 Task,
mandate_id: &'life2 str,
mandate_version: i64,
goal_run_id: &'life3 str,
root_task_attempt_id: &'life4 str,
max_non_root_tasks: i64,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
S: 'async_trait,
Insert one non-root action task into an exact mandate run while the
dispatcher-owned root attempt remains current. Implementations must
validate the mandate/run/attempt fence and task cap atomically and must
never create or rebind a goal run by goal id.
Source§fn claim_mandate_task_from_attempt<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
worker_instance_id: &'life2 str,
mandate_id: &'life3 str,
mandate_version: i64,
goal_run_id: &'life4 str,
root_task_attempt_id: &'life5 str,
lease_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskAttempt>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
S: 'async_trait,
fn claim_mandate_task_from_attempt<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
worker_instance_id: &'life2 str,
mandate_id: &'life3 str,
mandate_version: i64,
goal_run_id: &'life4 str,
root_task_attempt_id: &'life5 str,
lease_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskAttempt>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
S: 'async_trait,
Claim one pending non-root task inside an exact running mandate cycle.
The root task-attempt remains the control-plane lease; the returned
child attempt deliberately carries no worker-profile/workspace binding.
The independently fenced identifiers remain explicit because wrapping
them would churn the stable store API without reducing validation work.
Source§fn record_mandate_decision<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
decision: &'life1 MandateDecisionCycle,
intention: Option<&'life2 Intention>,
task_attempt_id: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
S: 'async_trait,
fn record_mandate_decision<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
decision: &'life1 MandateDecisionCycle,
intention: Option<&'life2 Intention>,
task_attempt_id: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
S: 'async_trait,
Insert exactly one deliberation result for a goal run, plus its ACT
intention when present. Implementations must commit both atomically.
fn record_mandate_decision_with_updates<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
decision: &'life1 MandateDecisionCycle,
intention: Option<&'life2 Intention>,
operating_updates: Option<&'life3 MandateOperatingUpdates>,
task_attempt_id: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
S: 'async_trait,
fn get_mandate_decision_for_run<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MandateDecisionCycle>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Source§fn current_run_evidence_receipt_ids<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_run_id: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn current_run_evidence_receipt_ids<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_run_id: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Tool-call ids of the run’s successful structured receipts that may
back a decision or measurement (newest first, at most
limit): the
same receipts evidence_receipt_ids accepts, minus the mandate
protocol’s own control tools.fn list_mandate_decisions<'life0, 'life1, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<MandateDecisionCycle>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn list_intentions<'life0, 'life1, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Intention>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Source§fn reserve_mandate_action_attempt<'life0, 'life1, 'async_trait>(
&'life0 self,
reservation: &'life1 MandateMutationReservation,
) -> Pin<Box<dyn Future<Output = Result<Option<MandateMutationAttempt>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn reserve_mandate_action_attempt<'life0, 'life1, 'async_trait>(
&'life0 self,
reservation: &'life1 MandateMutationReservation,
) -> Pin<Box<dyn Future<Output = Result<Option<MandateMutationAttempt>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Atomically reserve the exact next mutation attempt under the current
cycle, rolling-24h, cooldown, mandate, run, intention, task, and lease
fences. Implementations must insert the durable ledger row and advance
the cycle counter in one transaction.
Source§fn claim_mandate_mutation_dispatch<'life0, 'life1, 'async_trait>(
&'life0 self,
claim: &'life1 MandateMutationDispatchClaim,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn claim_mandate_mutation_dispatch<'life0, 'life1, 'async_trait>(
&'life0 self,
claim: &'life1 MandateMutationDispatchClaim,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Atomically claim one exact reserved mutation at the last common
dispatcher. A claim is one-use and must fail if any authority, run,
task-attempt, tool-call, digest, or reservation field is stale.
Source§fn get_mandate_mutation_quota_state<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
as_of: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MandateMutationQuotaState>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
S: 'async_trait,
fn get_mandate_mutation_quota_state<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mandate_id: &'life1 str,
as_of: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MandateMutationQuotaState>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
S: 'async_trait,
Read the typed, cross-cycle mutation quota projection at one instant.
This is advisory for deliberation; reservation remains authoritative.
fn list_mandate_mutation_attempts_for_run<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<MandateMutationAttempt>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Source§fn finalize_mandate_run_from_proof<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 MandateRunFinalizationRequest,
) -> Pin<Box<dyn Future<Output = Result<MandateRunFinalizationResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn finalize_mandate_run_from_proof<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 MandateRunFinalizationRequest,
) -> Pin<Box<dyn Future<Output = Result<MandateRunFinalizationResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Atomically prove and close a mandate run. Satisfied outcomes close the
goal run (and ACT intention) inside the proof transaction; reconciliation
results leave lifecycle state untouched for the caller’s explicit path.
Source§impl<S> NotificationStore for Swhere
S: WorkDatabase,
impl<S> NotificationStore for Swhere
S: WorkDatabase,
Source§fn record_background_spawn<'life0, 'life1, 'async_trait>(
&'life0 self,
spawn: &'life1 BackgroundSpawn,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn record_background_spawn<'life0, 'life1, 'async_trait>(
&'life0 self,
spawn: &'life1 BackgroundSpawn,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Record a background sub-agent that has started.
Source§fn finish_background_spawn<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn finish_background_spawn<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Forget a background sub-agent that has ended.
Source§fn background_spawns_for_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<BackgroundSpawn>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn background_spawns_for_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<BackgroundSpawn>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
The background sub-agents running for a session.
Source§fn take_background_spawns<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<BackgroundSpawn>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
fn take_background_spawns<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<BackgroundSpawn>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Remove and return every recorded background sub-agent.
Source§fn enqueue_notification<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 NotificationEntry,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn enqueue_notification<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 NotificationEntry,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Enqueue a notification for delivery.
Source§fn enqueue_goal_notification<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 NotificationEntry,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn enqueue_goal_notification<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 NotificationEntry,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Atomically claim a goal’s notification slot and enqueue its notification. Read more
Source§fn get_pending_notifications<'life0, 'async_trait>(
&'life0 self,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<NotificationEntry>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
fn get_pending_notifications<'life0, 'async_trait>(
&'life0 self,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<NotificationEntry>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Get pending notifications ordered by priority (critical first), then creation time.
Source§fn mark_notification_delivered<'life0, 'life1, 'async_trait>(
&'life0 self,
notification_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn mark_notification_delivered<'life0, 'life1, 'async_trait>(
&'life0 self,
notification_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Mark a notification as delivered.
Source§fn increment_notification_attempt<'life0, 'life1, 'async_trait>(
&'life0 self,
notification_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn increment_notification_attempt<'life0, 'life1, 'async_trait>(
&'life0 self,
notification_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Increment the attempt counter for a notification.
Source§fn notices_delivered_since<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
since: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<DeliveredNotice>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn notices_delivered_since<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
since: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<DeliveredNotice>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Notices delivered to
session_id at or after since, oldest first:
what the owner was already told while a turn ran, so its reply can
agree with them (crate::goals::notices_turn_context).Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> ReportBlockerStore for T
Source§impl<S> ScheduledRunStore for Swhere
S: WorkDatabase,
impl<S> ScheduledRunStore for Swhere
S: WorkDatabase,
Source§fn upsert_scheduled_run_state<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ScheduledRunState,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn upsert_scheduled_run_state<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ScheduledRunState,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Persist runtime state for an active scheduled run.
Source§fn get_scheduled_run_state<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ScheduledRunState>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn get_scheduled_run_state<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ScheduledRunState>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Load persisted runtime state for an active scheduled run.
fn get_scheduled_recovery_state<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ScheduledRecoveryState>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Source§fn list_escalated_recovery_candidates<'life0, 'async_trait>(
&'life0 self,
cooldown_secs: i64,
max_attempts: u16,
) -> Pin<Box<dyn Future<Output = Result<Vec<ScheduledRecoveryState>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
fn list_escalated_recovery_candidates<'life0, 'async_trait>(
&'life0 self,
cooldown_secs: i64,
max_attempts: u16,
) -> Pin<Box<dyn Future<Output = Result<Vec<ScheduledRecoveryState>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Escalated scheduled objectives that the recovery machine itself paused,
whose cool-down has elapsed and whose automatic recovery attempts are
still under the cap.
Source§fn record_scheduled_recovery_attempt<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn record_scheduled_recovery_attempt<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Record that an automatic recovery run was launched for the goal.
Source§fn delete_scheduled_run_state<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn delete_scheduled_run_state<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Delete persisted runtime state for an active scheduled run.
Source§impl<S> TaskDispatchStore for Swhere
S: WorkDatabase,
impl<S> TaskDispatchStore for Swhere
S: WorkDatabase,
Source§fn get_pending_tasks_by_priority<'life0, 'async_trait>(
&'life0 self,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Task>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
fn get_pending_tasks_by_priority<'life0, 'async_trait>(
&'life0 self,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Task>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Get pending tasks ordered by priority, filtering out those with unmet dependencies.
Source§fn get_stuck_tasks<'life0, 'async_trait>(
&'life0 self,
timeout_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Task>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
fn get_stuck_tasks<'life0, 'async_trait>(
&'life0 self,
timeout_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Task>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Get tasks stuck in running/claimed state longer than timeout_secs.
Source§fn get_recently_completed_tasks<'life0, 'life1, 'async_trait>(
&'life0 self,
since: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Task>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn get_recently_completed_tasks<'life0, 'life1, 'async_trait>(
&'life0 self,
since: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Task>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Get tasks completed after a given timestamp.
Source§fn mark_task_interrupted<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn mark_task_interrupted<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Mark a running/claimed task as interrupted (e.g., after crash or timeout).
Source§impl<S> TaskStore for Swhere
S: WorkDatabase,
impl<S> TaskStore for Swhere
S: WorkDatabase,
Source§fn create_task<'life0, 'life1, 'async_trait>(
&'life0 self,
task: &'life1 Task,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn create_task<'life0, 'life1, 'async_trait>(
&'life0 self,
task: &'life1 Task,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Create a new task within a goal.
Source§fn get_task<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Task>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn get_task<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Task>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Get a task by ID.
Source§fn update_task<'life0, 'life1, 'async_trait>(
&'life0 self,
task: &'life1 Task,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn update_task<'life0, 'life1, 'async_trait>(
&'life0 self,
task: &'life1 Task,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Update a task (full replacement).
Source§fn get_tasks_for_goal<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Task>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn get_tasks_for_goal<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Task>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Get all tasks for a goal.
Source§fn count_completed_tasks_for_goal<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<i64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn count_completed_tasks_for_goal<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<i64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Count completed/skipped tasks for a goal (used by progress-based circuit breaker).
Source§fn claim_task<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
agent_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
S: 'async_trait,
fn claim_task<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
agent_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
S: 'async_trait,
Atomically claim a pending task for an executor.
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Source§impl<S> WorkCoordinationStore for Swhere
S: WorkDatabase,
impl<S> WorkCoordinationStore for Swhere
S: WorkDatabase,
fn create_work_project<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
description: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<WorkProject, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
S: 'async_trait,
fn list_work_projects<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkProject>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Source§fn update_work_project<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 str,
name: Option<&'life2 str>,
path: Option<Option<&'life3 str>>,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkProject>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
S: 'async_trait,
fn update_work_project<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 str,
name: Option<&'life2 str>,
path: Option<Option<&'life3 str>>,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkProject>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
S: 'async_trait,
Rename a project or change its folder (
Some(None) clears it).
None when there is no such project.Source§fn delete_work_project<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn delete_work_project<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Delete a project: its sessions, goals, runs and journal move to the
default project, its bots to none, and its worker profiles go with
it.
false when there is no such project; the default one cannot
be deleted.Source§fn session_work_projects<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, String)>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
fn session_work_projects<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, String)>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Every session placed in a project other than the default one, with
its project id.
fn get_session_work_project<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn set_session_work_project<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
project_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
S: 'async_trait,
Source§fn channel_work_projects<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, String)>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
fn channel_work_projects<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, String)>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Every chat bot sending its direct-message chats to a project: (bot
channel, project id).
Source§fn set_channel_work_project<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
channel: &'life1 str,
project_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
S: 'async_trait,
fn set_channel_work_project<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
channel: &'life1 str,
project_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
S: 'async_trait,
Send bot
channel’s direct-message chats to project_id, or to no
project (None). false when there is no such project.Source§fn place_chat_by_channel<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
channel: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
S: 'async_trait,
fn place_chat_by_channel<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
channel: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
S: 'async_trait,
Place a direct-message chat of bot
channel in that bot’s project,
when the chat was never placed (taking a chat out of its project
places it in the default one, so that stays). Returns whether it
was placed now.fn start_goal_run<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
trigger_type: &'life2 str,
schedule_id: Option<&'life3 str>,
root_task_id: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<GoalRun, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
S: 'async_trait,
Source§fn record_missed_goal_run<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
schedule_id: Option<&'life2 str>,
due_at: &'life3 str,
summary: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<GoalRun, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
S: 'async_trait,
fn record_missed_goal_run<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
schedule_id: Option<&'life2 str>,
due_at: &'life3 str,
summary: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<GoalRun, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
S: 'async_trait,
Record an occurrence the scheduler skipped (the daemon was not
running and it is past its catch-up window) as a closed run with
status
missed, started at the time it was due. It is part of the
automation’s history, but never goes through Self::finish_goal_run:
a miss is not a failure and leaves the failure budget as it was.fn get_current_goal_run<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<GoalRun>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn get_goal_runs<'life0, 'life1, 'async_trait>(
&'life0 self,
goal_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<GoalRun>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Source§fn get_goal_run_for_task<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<GoalRun>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn get_goal_run_for_task<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<GoalRun>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Typed lifecycle owner for a task. Callers must use this relationship,
never infer run provenance from the task description.
fn get_tasks_for_goal_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Task>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn finish_goal_run<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
status: &'life2 str,
summary: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
S: 'async_trait,
fn claim_task_with_lease<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
worker_instance_id: &'life2 str,
worker_profile_id: Option<&'life3 str>,
lease_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskAttempt>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
S: 'async_trait,
fn get_current_task_attempt<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskAttempt>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn bind_task_attempt_worker<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
attempt_id: &'life1 str,
lease_token: &'life2 str,
worker_instance_id: &'life3 str,
worker_profile_id: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
S: 'async_trait,
fn heartbeat_task_attempt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
attempt_id: &'life1 str,
lease_token: &'life2 str,
lease_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
S: 'async_trait,
fn patch_task_from_attempt<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
attempt_id: &'life1 str,
lease_token: &'life2 str,
patch: &'life3 TaskAttemptPatch,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
S: 'async_trait,
Source§fn goal_run_has_live_attempt<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn goal_run_has_live_attempt<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Whether any worker still holds an unexpired execution lease on an
attempt belonging to this goal run. While one does, that worker owns
the run’s outcome; lifecycle reconciliation must not race it.
Source§fn recover_expired_task_attempts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
fn recover_expired_task_attempts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
S: 'async_trait,
Expire elapsed leases and return the affected task IDs. Idempotent tasks
with retry budget are re-queued; ambiguous writes require verification.
fn append_task_journal<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 TaskJournalEntry,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn get_task_journal<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<TaskJournalEntry>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn unblock_task<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
resolution: &'life2 str,
actor_id: &'life3 str,
source_channel: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
S: 'async_trait,
fn retry_work_task<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
actor_id: &'life2 str,
source_channel: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
S: 'async_trait,
fn cancel_work_task<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
actor_id: &'life2 str,
source_channel: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
S: 'async_trait,
fn upsert_worker_profile<'life0, 'life1, 'async_trait>(
&'life0 self,
profile: &'life1 WorkerProfile,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn get_worker_profile<'life0, 'life1, 'async_trait>(
&'life0 self,
profile_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkerProfile>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn list_worker_profiles<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkerProfile>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn assign_task_worker_profile<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
profile_id: &'life2 str,
actor_id: &'life3 str,
source_channel: Option<&'life4 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
S: 'async_trait,
fn set_task_workspace_policy<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
policy: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
S: 'async_trait,
fn get_task_workspace_policy<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Source§fn task_workspace_policy_is_explicit<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
fn task_workspace_policy_is_explicit<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
S: 'async_trait,
Whether the task’s workspace policy was set on the task itself
(
set_task_workspace_policy), rather than defaulted or inherited
from its worker profile.