Skip to main content

StoreData

Struct StoreData 

Source
pub struct StoreData {
Show 29 fields pub blocking_work: BlockingWork, pub git: Option<GitConfig>, pub console: Box<dyn Write + Send>, pub vfs: Vfs, pub vfs_info: VfsInfo, pub security_check: Arc<dyn SecurityCheck>, pub fs_max_read_size: u64, pub http_client: Arc<dyn HttpClient>, pub http_max_response_size: u64, pub http_max_download_timeout_ms: u64, pub auth_proxy: Arc<dyn AuthProxy>, pub secret_provider: Arc<dyn SecretProvider>, pub mcp_transport: Option<Arc<dyn McpTransport>>, pub llm_provider: Option<Arc<dyn LlmProvider>>, pub llm_budget: Option<Arc<ExecutionTokenBudget>>, pub embedding_provider: Option<Arc<dyn EmbeddingProvider>>, pub embedding_budget: Option<Arc<EmbeddingTokenBudget>>, pub session_kv: Option<Arc<dyn SessionKvStore>>, pub agent_provider: Option<Arc<dyn AgentProvider>>, pub skill_provider: Option<Arc<dyn SkillProvider>>, pub metrics: Arc<dyn MetricsSink>, pub tenant_limits: TenantLimits, pub host_fuel: u64, pub host_fuel_pending: u64, pub host_fuel_applied_at: Option<u64>, pub test_labels: RefCell<Vec<String>>, pub host_abi: Option<HostAbi>, pub type_info: BTreeMap<String, TypeInfoTable>, pub vtable_walk_depth: u32, /* private fields */
}

Fields§

§blocking_work: BlockingWork

After cancelling a host call, the execution owner drains this before reusing or releasing the store. Blocking work may still be cleaning up.

§git: Option<GitConfig>§console: Box<dyn Write + Send>§vfs: Vfs§vfs_info: VfsInfo§security_check: Arc<dyn SecurityCheck>§fs_max_read_size: u64§http_client: Arc<dyn HttpClient>§http_max_response_size: u64§http_max_download_timeout_ms: u64

Operator ceiling for a download, including streaming its body.

§auth_proxy: Arc<dyn AuthProxy>§secret_provider: Arc<dyn SecretProvider>§mcp_transport: Option<Arc<dyn McpTransport>>

The outbound @mcp/<server> transport the submilli:mcp.call host fn dispatches through, present when the embedder wires one. None in the pure-interpreter path, where MCP calls throw “transport not configured”.

§llm_provider: Option<Arc<dyn LlmProvider>>

The model provider submilli:llm dispatches through, present only when the embedder wires one. Left None the runtime has no model access at all rather than silently completing against some default — the guest surface reports that as a catchable configuration error (LlmCallError::NotConfigured), the same rule session_kv follows.

§llm_budget: Option<Arc<ExecutionTokenBudget>>

This execution’s token budget, reserving against its own ceiling and the server-wide one together. None in the pure-interpreter path, where there is no aggregate to protect and nothing to charge against; the prompt-count and prompt-size bounds still apply there, because they bound pathological shapes rather than spend. The embedder installs one per execution, and dropping it is what returns the reservation.

§embedding_provider: Option<Arc<dyn EmbeddingProvider>>

The provider submilli:embedding dispatches through, present only when the embedder wires one. None means the guest sees a catchable EmbeddingError::NotConfigured, never a silent default.

§embedding_budget: Option<Arc<EmbeddingTokenBudget>>

This execution’s embedding budget (tokens and outbound requests). None in the pure-interpreter path; dropping it returns unspent reservation.

§session_kv: Option<Arc<dyn SessionKvStore>>

Session-scoped key-value storage, present only when the embedder wires a provider. Left None the store stays absent rather than silently becoming per-execution scratch state that no later execute can read — the guest surface reports that as a configuration error.

§agent_provider: Option<Arc<dyn AgentProvider>>

The harness submilli:agents runs sub-agents through, present only when the embedder wires one. None makes every call a catchable AgentCallError::NotConfigured.

§skill_provider: Option<Arc<dyn SkillProvider>>

The harness submilli:skills reads skills through, present only when the embedder wires one. None makes every call a catchable SkillError::NotConfigured.

§metrics: Arc<dyn MetricsSink>

Embedder sink for host-operation metrics (HTTP transport latencies). Defaults to NoopMetricsSink; the server installs a Sentry-backed one.

§tenant_limits: TenantLimits§host_fuel: u64

Fuel charged by host functions for their own work; the rest of the fuel spent went to Wasm instructions. See fuel::charge_host_fuel.

§host_fuel_pending: u64

Host charges not yet applied to the engine’s fuel (see fuel::HOST_FUEL_BATCH).

§host_fuel_applied_at: Option<u64>

The engine’s fuel right after the last application of pending host charges; None before the first.

§test_labels: RefCell<Vec<String>>

Test-segment labels recorded by submilli:test.label, in call order. Only the test runner installs that host fn; an ordinary run leaves this empty. The runner reads it after main() returns to attribute the pass/fail outcome to the segment that was open at the time.

§host_abi: Option<HostAbi>

Recovered runtime types + the prelude instance handle host functions use to build real $string/$Array structs (vtable + payload) instead of raw arrays. None until the prelude instantiates; set by install_prelude_async. See crate::runtime::host::HostAbi.

§type_info: BTreeMap<String, TypeInfoTable>

Runtime type metadata keyed by package name.

§vtable_walk_depth: u32

Depth of the in-flight universal-vtable walk; see [MAX_VTABLE_WALK_DEPTH].

Implementations§

Source§

impl StoreData

Source

pub fn with_vfs(vfs: Vfs) -> Self

Source

pub fn with_vfs_and_cap(vfs: Vfs, max_store_bytes: u64) -> Self

Source

pub fn install_type_info(&mut self, table: TypeInfoTable)

Source

pub fn with_tempdir() -> Result<Self>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more