Trait GoalTaskRegistry
pub trait GoalTaskRegistry: Send + Sync {
// Required methods
fn create_goal<'life0, 'async_trait>(
&'life0 self,
task: TaskRecord,
goal: GoalTaskRecord,
continuation_context: Option<TaskContinuationContext>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn latest_active_goal_for_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
agent: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskRecord>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn latest_active_goal_for_context<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
agent: &'life1 str,
originator_route: Option<&'life2 str>,
principal_id: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskRecord>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn latest_active_goal_id_for_context<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
agent: &'life1 str,
originator_route: Option<&'life2 str>,
principal_id: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn get_goal_task<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<GoalTaskRecord>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_goal_objective<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
objective: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update_goal_limits<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
token_limit: Option<u64>,
cost_limit_usd: Option<f64>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_goal_pause<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
pause: Option<GoalPauseState>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn pause_goal_task<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
pause: GoalPauseState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn resume_goal_task<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
owner_pid: u32,
owner_boot_id: &'life2 str,
continuation_context: Option<TaskContinuationContext>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn set_continuation_context<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
context: Option<TaskContinuationContext>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_continuation_context<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskContinuationContext>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Required Methods§
fn create_goal<'life0, 'async_trait>(
&'life0 self,
task: TaskRecord,
goal: GoalTaskRecord,
continuation_context: Option<TaskContinuationContext>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn latest_active_goal_for_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
agent: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn latest_active_goal_for_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
agent: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolve the latest non-terminal goal task for agent directly from the
canonical task table. This is a read-only resolver, not cached state.
fn latest_active_goal_for_context<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
agent: &'life1 str,
originator_route: Option<&'life2 str>,
principal_id: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<Option<TaskRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Sourcefn latest_active_goal_id_for_context<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
agent: &'life1 str,
originator_route: Option<&'life2 str>,
principal_id: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn latest_active_goal_id_for_context<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
agent: &'life1 str,
originator_route: Option<&'life2 str>,
principal_id: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Resolve only the id of the latest non-terminal goal for the trusted
runtime context. This is a read-only projection from tasks.id, used
by hot attribution paths that do not need the full task record.
fn get_goal_task<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<GoalTaskRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_goal_objective<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
objective: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn update_goal_limits<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
token_limit: Option<u64>,
cost_limit_usd: Option<f64>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_goal_limits<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 str,
token_limit: Option<u64>,
cost_limit_usd: Option<f64>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Replace the persisted effective budget limits for a goal. These are creation/update-time policy limits only. Consumed and remaining usage stay derived from canonical usage ledger rows.