pub struct Runtime { /* private fields */ }Expand description
One process’s substrate: mentra’s runtime plus the resolution policy and host guards that were fixed when it was built.
Shared through an Arc by every Workspace opened on
it, so N repositories cost one provider resolution and one store handle.
Send and Sync; sessions are minted from &self.
Implementations§
Source§impl Runtime
impl Runtime
Sourcepub fn builder() -> RuntimeBuilder
pub fn builder() -> RuntimeBuilder
Configures a runtime before building it.
Sourcepub fn mentra_runtime(&self) -> &Runtime
pub fn mentra_runtime(&self) -> &Runtime
The runtime the workspaces run on, for a host that wants mentra’s own surface — the task board, teams, the store — alongside basis’s.
The same bargain as PreparedRun::session:
basis does not hide mentra, and reaching past basis’s surface is a
supported thing to do rather than a workaround.
Sourcepub fn provider(&self) -> &str
pub fn provider(&self) -> &str
The provider this runtime resolves models against, as its ProviderId
string — what every run from every workspace on it reports.
Sourcepub fn a2a_hop(&self) -> u32
pub fn a2a_hop(&self) -> u32
The fixed command environment, as the pairs a spawned program is given.
A Vec rather than the map it is stored as, because that is the shape
crate::subprocess::execute takes and what a declared tool merges its
own env over. Sorted, because the map is.
The hop the work this runtime does arrived at over A2A — zero for a
top-level caller. See RuntimeBuilder::with_a2a_hop.