pub trait Source: Send + Sync {
Show 63 methods
// Required methods
fn app_name(&self) -> &str;
fn transcript<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Event>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn requests<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: Option<&'life2 str>,
open_only: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<ApprovalRequest>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn request<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ApprovalRequest>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn decide<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
expected_version: u64,
decision: ApprovalDecision,
) -> Pin<Box<dyn Future<Output = Result<ApprovalRequest>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn changed<'life0, 'async_trait>(
&'life0 self,
max: Duration,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn resolved<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn resolved_by<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
request: &'life2 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn always_allow_offer<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Option<AlwaysAllowOffer>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn prepare_always_allow<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
request: &'life2 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn RuleCommit>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn agents<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentState>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn primary_agent(&self) -> Option<String> { ... }
fn rates_high(&self, request: &ApprovalRequest) -> bool { ... }
fn evidence_kept<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Vec<EvidenceKept>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn evidence_image<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
index: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<EvidenceBytes>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn holds_again(&self) -> bool { ... }
fn hold_again<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
request: &'life2 ApprovalRequest,
version: u64,
args: Value,
why: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn change_image<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
request: &'life2 ApprovalRequest,
version: u64,
change: &'life3 ImageChange,
) -> Pin<Box<dyn Future<Output = Result<ImageChanged>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn screen_plan<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Option<HeldPlan>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn decide_screen_plan<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
request: &'life2 ApprovalRequest,
version: u64,
digest: &'life3 str,
allow: bool,
reason: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<ApprovalRequest>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn close_screen_plan<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
plan: &'life2 HeldPlan,
why: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn run_ended<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Option<DateTime<Utc>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn keeps_vision_answers(&self) -> bool { ... }
fn vision_answers<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Value>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn vision_image<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
image: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<EvidenceBytes>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn example_files<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<String>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn save_example<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
file: &'life2 str,
set: Value,
image_path: &'life3 str,
image: &'life4 EvidenceBytes,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait { ... }
fn example_set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
file: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn moves_money(&self, request: &ApprovalRequest) -> bool { ... }
fn busy<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn turn_failures<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<TurnFailure>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn waiting_on_decision<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn start_turn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: &'life2 str,
text: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn start_turn_images<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: &'life2 str,
text: &'life3 str,
images: &'life4 [MessageImage],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait { ... }
fn stop_turn<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn steer<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: &'life2 str,
text: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Steering>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn request_call<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: &'life2 str,
text: &'life3 str,
call: RequestedCall,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn stop_all<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
reason: &'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 resume_all<'life0, 'life1, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn stopped<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn mode<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Option<HarnessMode>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn opens_sessions(&self) -> bool { ... }
fn set_mode<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: &'life2 str,
mode: HarnessMode,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn spend<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SpendToday>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn quiet_hours(&self) -> Option<QuietHours> { ... }
fn serves_kernel_routes(&self) -> bool { ... }
fn keeps_ledger(&self) -> bool { ... }
fn ledger<'life0, 'async_trait>(
&'life0 self,
since: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<LedgerEntry>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn keeps_agents(&self) -> bool { ... }
fn agent_definitions<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentDetail>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<AgentDetail>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn agent_choices<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AgentChoices>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn preview_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
request: AgentPreviewRequest,
) -> Pin<Box<dyn Future<Output = Result<AgentPreview>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn add_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
draft: AgentDraft,
digest: &'life2 str,
replaces: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<AgentDetail>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn change_agent<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
version: u64,
draft: AgentDraft,
digest: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<AgentDetail>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn pause_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<AgentDetail>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn resume_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<AgentDetail>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn remove_agent<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
version: u64,
digest: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<EndedWork>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn copy_rule_to_agent<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
rule: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn agent_threads<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
agent: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, DateTime<Utc>)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn agent_of_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 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 { ... }
fn start_turn_with<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
session: &'life3 str,
text: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait { ... }
fn start_turn_with_images<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
session: &'life3 str,
text: &'life4 str,
images: &'life5 [MessageImage],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait { ... }
}Expand description
The seam between the engine and what it shows (spec 3.3 §6).
Implement it to put the engine over another runtime; the methods with defaults report
surface.unsupported, and the engine hides what a source cannot do.
Required Methods§
Sourcefn transcript<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Event>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn transcript<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Event>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The session’s events in store order, or None when user has no such session.
The feed numbers events by their position here (spec 3.3 §6), so a source returns every event, oldest first, exactly as its store keeps them.
Sourcefn requests<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: Option<&'life2 str>,
open_only: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<ApprovalRequest>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn requests<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: Option<&'life2 str>,
open_only: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<ApprovalRequest>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The decision requests caller may answer — of the caller’s session session when
it is set (InboxQuery::with_session, spec 3.3 §10 C1) — open ones only when
open_only.
Sourcefn request<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ApprovalRequest>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn request<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ApprovalRequest>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
One decision request.
Sourcefn decide<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
expected_version: u64,
decision: ApprovalDecision,
) -> Pin<Box<dyn Future<Output = Result<ApprovalRequest>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn decide<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
expected_version: u64,
decision: ApprovalDecision,
) -> Pin<Box<dyn Future<Output = Result<ApprovalRequest>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Records decision at expected_version: ApprovalService::decide (spec 3.3 §6,
S-I2). Never retried.
Provided Methods§
Sourcefn changed<'life0, 'async_trait>(
&'life0 self,
max: Duration,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn changed<'life0, 'async_trait>(
&'life0 self,
max: Duration,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Waits until something the surfaces show may have changed, or max passes.
Sourcefn resolved<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolved<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called once a decision the engine recorded resolved its request, so a call held in a run that is not parked durably resumes. The default does nothing: an approval service with a run store wakes a parked run itself.
Sourcefn resolved_by<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
request: &'life2 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn resolved_by<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
request: &'life2 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
resolved, for the answer caller gave: a source that runs the
resumed turn runs it as caller when the session is theirs, so the session’s mode and
standing rules apply to it (spec 3.3 §6). The default calls resolved.
Sourcefn always_allow_offer<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Option<AlwaysAllowOffer>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn always_allow_offer<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Option<AlwaysAllowOffer>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
What “Always allow” would create for request, when this source can create it.
Sourcefn prepare_always_allow<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
request: &'life2 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn RuleCommit>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn prepare_always_allow<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
request: &'life2 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn RuleCommit>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Prepares the standing rule “Always allow” offered for request, as caller, before the
decision is recorded. Returns a commit the engine runs only once the decision approved
the request: never after a lost version, a denial, or an approval a quorum still waits
on.
Sourcefn agents<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn agents<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The agents of user.
Sourcefn primary_agent(&self) -> Option<String>
fn primary_agent(&self) -> Option<String>
The agent a message goes to when the person names none, by its name in the runtime: the
one the tray’s “Ask Finance” box addresses (spec 3.3 §5.5). None, the default, when
the source has no single primary agent.
Sourcefn rates_high(&self, request: &ApprovalRequest) -> bool
fn rates_high(&self, request: &ApprovalRequest) -> bool
Whether the source rates request’s call high risk whatever the request says, so every
surface asks for what a high-risk call needs (spec 3.3 §7.2): a kernel rates so a tool
its mounted drivers declare publish_public or financial (spec 3.2 K-I9). false, the
default, leaves the request’s own risk.
Sourcefn evidence_kept<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Vec<EvidenceKept>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn evidence_kept<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Vec<EvidenceKept>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Whether each image request holds as evidence is still kept, in the order of its
evidence (spec 3.7 §8.2). The default cannot tell, and the card shows each image.
Sourcefn evidence_image<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
index: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<EvidenceBytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn evidence_image<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
index: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<EvidenceBytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The indexth image request holds as evidence, read from where its locator says and
served only when its bytes hash to its digest; None when it is no longer kept. The
engine checks the caller may see the request first (spec 3.7 §7.8: surfaces load
evidence with the viewer’s own authorisation).
§Errors
surface.unsupported when the source keeps no images, surface.invalid when the
stored bytes do not match the digest, or the source’s error.
Sourcefn holds_again(&self) -> bool
fn holds_again(&self) -> bool
Whether hold_again and change_image work
here: an edited call with images, or a changed image, is held again for the person
rather than run (spec 3.7 V-I5). false, the default.
Sourcefn hold_again<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
request: &'life2 ApprovalRequest,
version: u64,
args: Value,
why: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn hold_again<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
request: &'life2 ApprovalRequest,
version: u64,
args: Value,
why: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Holds request’s call again with args, as caller asked for it: the request at
version is closed with why, and the session’s agent holds the call with its new
arguments, and the evidence they make, for the person’s decision (spec 3.7 V-I5). A
call with images never runs on edited arguments nobody saw the images of.
§Errors
surface.unsupported by default; approval.version_conflict when the request changed.
Sourcefn change_image<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
request: &'life2 ApprovalRequest,
version: u64,
change: &'life3 ImageChange,
) -> Pin<Box<dyn Future<Output = Result<ImageChanged>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn change_image<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
request: &'life2 ApprovalRequest,
version: u64,
change: &'life3 ImageChange,
) -> Pin<Box<dyn Future<Output = Result<ImageChanged>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Makes the image change describes from request’s evidence — cut smaller, more of it
covered — keeps it beside the original, and holds the call again with it in place of
the original (board choice A8, spec 3.7 V-I5).
§Errors
surface.unsupported by default; surface.invalid when the image cannot be changed.
Sourcefn screen_plan<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Option<HeldPlan>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn screen_plan<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Option<HeldPlan>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The screen plan request’s held call is a step of, when the source keeps it (spec 3.7
Q8). None, the default: every call is decided on a card of its own.
Sourcefn decide_screen_plan<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
request: &'life2 ApprovalRequest,
version: u64,
digest: &'life3 str,
allow: bool,
reason: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<ApprovalRequest>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn decide_screen_plan<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
request: &'life2 ApprovalRequest,
version: u64,
digest: &'life3 str,
allow: bool,
reason: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<ApprovalRequest>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Decides the screen plan whose first step request holds, as caller answered its card
— every step allowed, or denied with reason — and records the decision on request at
version (spec 3.7 Q8, S-I2): an approval runs each step once, in order, with the plan’s
binding, and a step whose target moved is held again for a card of its own.
§Errors
surface.unsupported by default; a conflict when the plan or the request changed since
the card was shown.
Sourcefn close_screen_plan<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
plan: &'life2 HeldPlan,
why: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn close_screen_plan<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
plan: &'life2 HeldPlan,
why: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Closes the open card of plan, whose first step request holds, for why: the plan
ends and every step of it still held is cancelled, so none runs (spec 3.7 Q8, V-I17).
§Errors
surface.unsupported by default, or the source’s error.
Sourcefn run_ended<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Option<DateTime<Utc>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn run_ended<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Option<DateTime<Utc>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
When the run that waited on request ended while the request is still open, so the
answer is used when the agent picks the thread up again (board choice A12). None, the
default, when a run still waits or the source cannot tell.
Sourcefn keeps_vision_answers(&self) -> bool
fn keeps_vision_answers(&self) -> bool
Whether vision_answers and
vision_image work here, so an image card’s “Open the source
image” opens the annotated viewer (board choice A9). false, the default.
Sourcefn vision_answers<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn vision_answers<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The answer records the vision tools left in session of user, as JSON, oldest first
(spec 3.7 §8.2, the annotated viewer). The default keeps none.
§Errors
The source’s error.
Sourcefn vision_image<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
image: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<EvidenceBytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn vision_image<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
image: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<EvidenceBytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
The image image of session of user — a sha256: digest, or the name of an image
artifact the session holds — served only when its bytes hash to the digest a digest
names; None when the session holds no such image. The engine checks the caller owns
the session first (spec 3.7 §8.3: read routes authorised as the inbox is).
§Errors
surface.unsupported when the source keeps no images, surface.invalid when the
stored bytes do not match the digest, or the source’s error.
Sourcefn example_files<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<String>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn example_files<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<String>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The eval fixture files a labelled example may be saved to, relative to the fixtures’
root (board choice V13); None, the default, when the source saves no examples.
Sourcefn save_example<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
file: &'life2 str,
set: Value,
image_path: &'life3 str,
image: &'life4 EvidenceBytes,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn save_example<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
file: &'life2 str,
set: Value,
image_path: &'life3 str,
image: &'life4 EvidenceBytes,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Writes the eval set set to file under the fixtures’ root and the image image
beside it at image_path, relative to the file, when it is not there already
(board choice V13). The run’s own answer is untouched.
§Errors
surface.unsupported by default; surface.invalid when file leaves the root; the
source’s error.
Sourcefn example_set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
file: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn example_set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
file: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The eval set at file under the fixtures’ root, when there is one.
§Errors
surface.unsupported by default; the source’s error.
Sourcefn moves_money(&self, request: &ApprovalRequest) -> bool
fn moves_money(&self, request: &ApprovalRequest) -> bool
Whether request’s call moves money by the source’s account (spec 3.3 §7.4 rule 4): a
kernel answers for the tools its mounted drivers declare financial (spec 3.2 K-I9).
The engine also counts the payment tools; false, the default, adds nothing to them.
Sourcefn busy<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn busy<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Whether a turn of the session is running now.
Sourcefn turn_failures<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<TurnFailure>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn turn_failures<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<TurnFailure>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The turns of user’s session session that ended in an error, oldest first: a model
call that failed leaves no event in the session, so the thread shows each where the
reply would have been. The default reports none.
§Errors
The source’s error.
Sourcefn waiting_on_decision<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn waiting_on_decision<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Whether a call of the session waits on a decision, whoever may answer it: input typed meanwhile is queued behind it (spec 3.3 §7.4 rule 2), even when the decision was routed to approvers other than the session’s owner. The default says no; the engine still queues behind the decisions the caller may answer.
Sourcefn start_turn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: &'life2 str,
text: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn start_turn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: &'life2 str,
text: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Starts a turn of the session on text.
Sourcefn start_turn_images<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: &'life2 str,
text: &'life3 str,
images: &'life4 [MessageImage],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn start_turn_images<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: &'life2 str,
text: &'life3 str,
images: &'life4 [MessageImage],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Starts a turn of the session on text and the images the person sent with it
(spec 3.3 §5.1). The default sends a message without images through
start_turn and reports surface.unsupported for one with them.
§Errors
surface.unsupported when the source cannot send images, or the source’s error.
Sourcefn stop_turn<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn stop_turn<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Stops the session’s running turn (spec 3.3 §5.1 “Stop the turn”): the agent stops at
once and waits for the next message; nothing it held for a decision is answered.
Returns whether a turn was running. The default reports surface.unsupported.
§Errors
surface.unsupported when the source cannot stop one turn, or the source’s error.
Sourcefn steer<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: &'life2 str,
text: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Steering>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn steer<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: &'life2 str,
text: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Steering>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Offers text to the turn of the session that runs now (spec 3.3 §6 “steer”): the
runtime screens it as it screens a turn’s own message, and the agent takes it at its
next safe point. Returns the wait for what became of it, or None when no turn takes
messages here — none runs, another replica runs it, or the source cannot steer — and
the message goes as the session’s next. The default answers None.
§Errors
The source’s error when the message is refused: everything is stopped, or an input guardrail blocks it.
Sourcefn request_call<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: &'life2 str,
text: &'life3 str,
call: RequestedCall,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn request_call<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: &'life2 str,
text: &'life3 str,
call: RequestedCall,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Starts a turn of the session on text that carries call, a call caller asked for
through a form an agent drew (spec 3.3 §7.4 rule 5, wave 4 decision 13). The session’s
agent holds the call as itself, inside its own kernel target, under its own policy,
standing rules, acting context and approval store, for the person’s decision — or
refuses it — before any model call. The default reports surface.unsupported.
§Errors
surface.unsupported when the source cannot start such a turn, or the source’s error.
Sourcefn stop_all<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
reason: &'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 stop_all<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
reason: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Stops every agent (spec 3.3 §8.2 “Stop all”).
Sourcefn resume_all<'life0, 'life1, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resume_all<'life0, 'life1, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resumes after a stop (spec 3.3 §8.2 “Resume all”).
Sourcefn stopped<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stopped<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Whether everything is stopped.
Sourcefn mode<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Option<HarnessMode>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn mode<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Option<HarnessMode>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The session’s mode, when the source runs a harness.
Sourcefn opens_sessions(&self) -> bool
fn opens_sessions(&self) -> bool
Whether set_mode opens a session the caller names that has no
events yet, so a new thread takes a mode before its first message (spec 3.3 §5.2). The
default says no: a session store cannot tell such a session from another person’s,
so the engine sets the mode of the caller’s own sessions only (S-I8).
Sourcefn set_mode<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: &'life2 str,
mode: HarnessMode,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_mode<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
session: &'life2 str,
mode: HarnessMode,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sets the session’s mode.
Sourcefn spend<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SpendToday>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn spend<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SpendToday>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Today’s spend for user, and the daily limit.
Sourcefn quiet_hours(&self) -> Option<QuietHours>
fn quiet_hours(&self) -> Option<QuietHours>
Quiet time, when the source knows it.
Sourcefn serves_kernel_routes(&self) -> bool
fn serves_kernel_routes(&self) -> bool
Whether this server serves the control-plane routes of the kernel the source runs on
(/api/kernel), so the web home reads them (Served::Kernel).
false, the default.
Sourcefn keeps_ledger(&self) -> bool
fn keeps_ledger(&self) -> bool
Whether the source keeps the /proc ledger ledger reads: without
one, “While you were away” is empty whatever ran (spec 3.3 §5.1).
Sourcefn ledger<'life0, 'async_trait>(
&'life0 self,
since: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<LedgerEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ledger<'life0, 'async_trait>(
&'life0 self,
since: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<LedgerEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The /proc ledger rows since since, oldest first.
Sourcefn keeps_agents(&self) -> bool
fn keeps_agents(&self) -> bool
Whether the source keeps agents a person adds: the roster ends with New agent.
Sourcefn agent_definitions<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentDetail>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn agent_definitions<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentDetail>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The agents user added, suggested ones included; none by default.
Sourcefn agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<AgentDetail>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<AgentDetail>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
One agent user added.
Sourcefn agent_choices<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AgentChoices>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn agent_choices<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AgentChoices>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
What a person may choose for an agent.
Sourcefn preview_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
request: AgentPreviewRequest,
) -> Pin<Box<dyn Future<Output = Result<AgentPreview>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn preview_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
request: AgentPreviewRequest,
) -> Pin<Box<dyn Future<Output = Result<AgentPreview>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
What a change would let an agent do, with the digest it applies with.
Sourcefn add_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
draft: AgentDraft,
digest: &'life2 str,
replaces: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<AgentDetail>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
draft: AgentDraft,
digest: &'life2 str,
replaces: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<AgentDetail>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Adds the agent draft previewed with digest; replaces names the suggestion Change
it first ends.
Sourcefn change_agent<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
version: u64,
draft: AgentDraft,
digest: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<AgentDetail>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn change_agent<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
version: u64,
draft: AgentDraft,
digest: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<AgentDetail>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Changes agent at version to draft, previewed with digest.
Sourcefn pause_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<AgentDetail>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn pause_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<AgentDetail>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Pauses agent.
Sourcefn resume_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<AgentDetail>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn resume_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<AgentDetail>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Resumes agent, paused by hand.
Sourcefn remove_agent<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
version: u64,
digest: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<EndedWork>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn remove_agent<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
version: u64,
digest: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<EndedWork>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Removes agent at version, previewed with digest; returns what ended.
Sourcefn copy_rule_to_agent<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
rule: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn copy_rule_to_agent<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
rule: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Copies the person’s standing rule rule to agent, pinned to it (S-I19); returns its
words.
Sourcefn agent_threads<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
agent: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, DateTime<Utc>)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn agent_threads<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
agent: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, DateTime<Utc>)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The threads of user’s agent agent: each session it ran and when it last changed;
none by default. A removed agent’s threads are read through it (spec 3.3 §5.7).
Sourcefn agent_of_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 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,
fn agent_of_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 str,
session: &'life2 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,
The agent whose thread session is: its stamp, else the target of its latest run.
Sourcefn start_turn_with<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
session: &'life3 str,
text: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn start_turn_with<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
session: &'life3 str,
text: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Starts a thread of session with agent on text (spec 3.3 §5.7 “Threads”); the
default starts a turn of the source’s own agent.
Sourcefn start_turn_with_images<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
session: &'life3 str,
text: &'life4 str,
images: &'life5 [MessageImage],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn start_turn_with_images<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
caller: &'life1 Caller,
agent: &'life2 str,
session: &'life3 str,
text: &'life4 str,
images: &'life5 [MessageImage],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
start_turn_with with the images the person sent with the
thread’s first message (spec 3.3 §5.1). The default sends a message without images
through start_turn_with and reports surface.unsupported for one with them.
§Errors
surface.unsupported when the source cannot send images, or the source’s error.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".