pub struct PilotServiceImpl {
atlas: AtlasClient,
provider_id: String,
vlm: VlmClient,
soma_prompt_block: Arc<String>,
histories: Arc<Mutex<HashMap<String, Arc<Mutex<Vec<Message>>>>>>,
task_states: Arc<Mutex<HashMap<String, Arc<Mutex<Option<TaskState>>>>>>,
cancels: Arc<Mutex<HashMap<String, Sender<bool>>>>,
steers: Arc<Mutex<HashMap<String, ActiveTurnInput>>>,
seen_task_ids: Arc<Mutex<HashMap<String, VecDeque<String>>>>,
plan_seq: Arc<AtomicU64>,
}Fields§
§atlas: AtlasClientAtlasClient is cheap to clone (its inner channel is just a handle);
each Stream RPC clones it to discover executor concurrently without
serialising on a single mutex.
provider_id: StringPilot’s own provider_id; passed to atlas as consumer_id on every
ConnectCapability so the channel record reflects who is using
the executor.
vlm: VlmClient§soma_prompt_block: Arc<String>§histories: Arc<Mutex<HashMap<String, Arc<Mutex<Vec<Message>>>>>>§task_states: Arc<Mutex<HashMap<String, Arc<Mutex<Option<TaskState>>>>>>Harness-owned standing goal per session. It survives a transport turn that pauses for user input, so the next message cannot silently replace unfinished work with a model-authored summary.
cancels: Arc<Mutex<HashMap<String, Sender<bool>>>>Per-session cancellation senders. abort_turn Task signals this
without holding the history lock.
steers: Arc<Mutex<HashMap<String, ActiveTurnInput>>>Per-session steer queues. A Task submitted while a turn is already
running for that session is pushed here as a mid-task steer instead of
starting a second turn; the running run_turn drains it.
seen_task_ids: Arc<Mutex<HashMap<String, VecDeque<String>>>>Recently accepted task ids, scoped by session. A client retry with the same id is acknowledged exactly once and never starts or steers a turn twice. The bounded queue prevents an unbounded session-lifetime set.
plan_seq: Arc<AtomicU64>Process-global RTDL plan-id counter. Executor’s active table is global, so ids must be unique across sessions as well as turns.
Implementations§
Source§impl PilotServiceImpl
impl PilotServiceImpl
pub fn new( atlas: AtlasClient, provider_id: String, vlm: VlmClient, soma_prompt_block: String, ) -> Self
async fn get_or_create_history( &self, session_id: &str, ) -> Arc<Mutex<Vec<Message>>> ⓘ
async fn get_or_create_task_state( &self, session_id: &str, ) -> Arc<Mutex<Option<TaskState>>> ⓘ
async fn accept_task_id_once(&self, session_id: &str, task_id: &str) -> bool
Trait Implementations§
Source§impl Clone for PilotServiceImpl
impl Clone for PilotServiceImpl
Source§fn clone(&self) -> PilotServiceImpl
fn clone(&self) -> PilotServiceImpl
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl RobonixSystemPilot for PilotServiceImpl
impl RobonixSystemPilot for PilotServiceImpl
Source§type SubmitTaskStream = ReceiverStream<Result<PilotEvent, Status>>
type SubmitTaskStream = ReceiverStream<Result<PilotEvent, Status>>
fn submit_task<'life0, 'async_trait>(
&'life0 self,
request: Request<Task>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubmitTaskStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl RobonixSystemPilotGetHealth for PilotServiceImpl
impl RobonixSystemPilotGetHealth for PilotServiceImpl
fn get_module_health<'life0, 'async_trait>(
&'life0 self,
_request: Request<GetModuleHealthRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetModuleHealthResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !Freeze for PilotServiceImpl
impl !RefUnwindSafe for PilotServiceImpl
impl Send for PilotServiceImpl
impl Sync for PilotServiceImpl
impl Unpin for PilotServiceImpl
impl UnsafeUnpin for PilotServiceImpl
impl !UnwindSafe for PilotServiceImpl
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].