Skip to main content

LuaRuntimeHostOptions

Struct LuaRuntimeHostOptions 

Source
pub struct LuaRuntimeHostOptions {
Show 35 fields pub runtime_root: Option<PathBuf>, pub managed_runtime_distribution_root: Option<PathBuf>, pub managed_runtime_environment_root: Option<PathBuf>, pub managed_runtime_config: LuaRuntimeManagedRuntimeConfig, pub temp_dir: Option<PathBuf>, pub resources_dir: Option<PathBuf>, pub lua_packages_dir: Option<PathBuf>, pub host_provided_tool_root: Option<PathBuf>, pub host_provided_lua_root: Option<PathBuf>, pub host_provided_ffi_root: Option<PathBuf>, pub system_lua_lib_dir: Option<PathBuf>, pub download_cache_root: Option<PathBuf>, pub dependency_dir_name: String, pub state_dir_name: String, pub database_dir_name: String, pub skill_config_file_path: Option<PathBuf>, pub allow_network_download: bool, pub github_base_url: Option<String>, pub github_api_base_url: Option<String>, pub official_skill_hub_base_url: Option<String>, pub enable_private_url_skill_install: bool, pub private_skill_source_allowlist: Vec<String>, pub default_text_encoding: Option<String>, pub sqlite_library_path: Option<PathBuf>, pub sqlite_provider_mode: LuaRuntimeDatabaseProviderMode, pub sqlite_callback_mode: LuaRuntimeDatabaseCallbackMode, pub lancedb_library_path: Option<PathBuf>, pub lancedb_provider_mode: LuaRuntimeDatabaseProviderMode, pub lancedb_callback_mode: LuaRuntimeDatabaseCallbackMode, pub space_controller: LuaRuntimeSpaceControllerOptions, pub cache_config: Option<ToolCacheConfig>, pub runlua_pool_config: Option<LuaRuntimeRunLuaPoolConfig>, pub reserved_entry_names: Vec<String>, pub ignored_skill_ids: Vec<String>, pub capabilities: LuaRuntimeCapabilityOptions,
}
Expand description

Host-provided filesystem and runtime paths consumed by the LuaSkills library. 宿主提供给 LuaSkills 库消费的文件系统与运行时路径集合。

Fields§

§runtime_root: Option<PathBuf>

Optional canonical LuaSkills runtime root used to derive the fixed runtime layout. 用于推导固定运行时布局的可选规范 LuaSkills 运行时根目录。

§managed_runtime_distribution_root: Option<PathBuf>

Optional host-configured read-only root containing managed Python and Node distributions. 可选的宿主配置只读根目录,包含受管 Python 与 Node 发行包。

§managed_runtime_environment_root: Option<PathBuf>

Optional host-configured writable root containing reusable managed environments. 可选的宿主配置可写根目录,包含可复用受管环境。

§managed_runtime_config: LuaRuntimeManagedRuntimeConfig

Host-selected managed Python/Node worker and persistent-session resource policy. 宿主选择的受管 Python/Node Worker 与持久会话资源策略。

§temp_dir: Option<PathBuf>

Host-managed temporary directory used by luaexec spill files and similar transient artifacts. 宿主管理的临时目录,供 luaexec 请求文件等短生命周期产物使用。

§resources_dir: Option<PathBuf>

Optional host-managed resources directory exposed to Lua as vulcan.runtime.resources_dir. 以 vulcan.runtime.resources_dir 形式暴露给 Lua 的可选宿主管理资源目录。

§lua_packages_dir: Option<PathBuf>

Optional lua_packages root used to build package.path and package.cpath. 用于拼接 package.pathpackage.cpath 的可选 lua_packages 根目录。

§host_provided_tool_root: Option<PathBuf>

Host-managed root directory used only to probe host-provided tool dependencies. 仅用于探测宿主提供工具依赖的宿主管理根目录。

§host_provided_lua_root: Option<PathBuf>

Host-managed root directory used only to probe host-provided Lua package dependencies. 仅用于探测宿主提供 Lua 包依赖的宿主管理根目录。

§host_provided_ffi_root: Option<PathBuf>

Host-managed root directory used only to probe host-provided FFI/native dependencies. 仅用于探测宿主提供 FFI/原生依赖的宿主管理根目录。

§system_lua_lib_dir: Option<PathBuf>

Optional fixed host-owned system Lua library directory used by system_lua_lib leases. 供 system_lua_lib 租约使用的可选固定宿主系统 Lua 库目录。

§download_cache_root: Option<PathBuf>

Host-managed cache directory used for downloaded archives and remote manifests. 宿主管理的下载缓存目录,用于归档文件和远程清单缓存。

§dependency_dir_name: String

Fixed sibling directory name used under one skill-root parent to store dependencies. 在单个技能根父目录下存放依赖时使用的固定兄弟目录名称。

§state_dir_name: String

Fixed sibling directory name used under one skill-root parent to store skill state. 在单个技能根父目录下存放技能状态时使用的固定兄弟目录名称。

§database_dir_name: String

Fixed sibling directory name used under one skill-root parent to store skill databases. 在单个技能根父目录下存放技能数据库时使用的固定兄弟目录名称。

§skill_config_file_path: Option<PathBuf>

Optional unified skill config file path owned by the host. 由宿主拥有的可选统一技能配置文件路径。

§allow_network_download: bool

Whether the runtime is allowed to perform network downloads while installing dependencies. 运行时在安装依赖时是否允许执行网络下载。

§github_base_url: Option<String>

Optional GitHub site base URL override used to rewrite browser download URLs. 可选的 GitHub 站点基址覆盖,用于重写浏览器下载地址。

§github_api_base_url: Option<String>

Optional GitHub API base URL override used to resolve release metadata. 可选的 GitHub API 基址覆盖,用于解析 release 元数据。

§official_skill_hub_base_url: Option<String>

Optional official LuaSkills Hub base URL used by managed Hub installs. 受管 Hub 安装使用的可选官方 LuaSkills Hub 基址。

§enable_private_url_skill_install: bool

Whether trusted system operations may install from private URL manifests. 可信 system 操作是否允许从私有 URL manifest 安装。

§private_skill_source_allowlist: Vec<String>

Host-controlled URL prefixes allowed for private skill manifests. 宿主管控的私有技能 manifest 允许 URL 前缀。

§default_text_encoding: Option<String>

Optional default text encoding label used by managed IO and process APIs. 托管 IO 与进程 API 使用的可选默认文本编码标签。

§sqlite_library_path: Option<PathBuf>

Explicit SQLite dynamic-library path owned by the host. 由宿主显式提供的 SQLite 动态库路径。

§sqlite_provider_mode: LuaRuntimeDatabaseProviderMode

SQLite database provider mode selected by the host. 宿主为 SQLite 数据库选择的 provider 模式。

§sqlite_callback_mode: LuaRuntimeDatabaseCallbackMode

SQLite callback transport mode selected by the host when provider mode is host_callback. 当 provider 模式为 host_callback 时,宿主为 SQLite 选择的回调传输模式。

§lancedb_library_path: Option<PathBuf>

Explicit LanceDB dynamic-library path owned by the host. 由宿主显式提供的 LanceDB 动态库路径。

§lancedb_provider_mode: LuaRuntimeDatabaseProviderMode

LanceDB database provider mode selected by the host. 宿主为 LanceDB 数据库选择的 provider 模式。

§lancedb_callback_mode: LuaRuntimeDatabaseCallbackMode

LanceDB callback transport mode selected by the host when provider mode is host_callback. 当 provider 模式为 host_callback 时,宿主为 LanceDB 选择的回调传输模式。

§space_controller: LuaRuntimeSpaceControllerOptions

Shared controller client options used when one database backend selects space_controller. 当数据库后端选择 space_controller 时所使用的共享控制器客户端选项。

§cache_config: Option<ToolCacheConfig>

Host-provided transient cache policy consumed by vulcan.cache. 由宿主提供并供 vulcan.cache 消费的临时缓存策略。

§runlua_pool_config: Option<LuaRuntimeRunLuaPoolConfig>

Optional dedicated pool configuration for isolated vulcan.runtime.lua.exec VMs. 供隔离 vulcan.runtime.lua.exec 虚拟机使用的可选独立池配置。

§reserved_entry_names: Vec<String>

Host-reserved public entry names that LuaSkills canonical name generation must never occupy directly. 宿主保留的公开入口名称集合,LuaSkills 在生成 canonical 名称时必须直接避开这些名称。

§ignored_skill_ids: Vec<String>

Host-forced skill identifiers that must be skipped before dependency or database setup. 宿主强制跳过的技能标识符列表,会在依赖或数据库初始化前生效。

§capabilities: LuaRuntimeCapabilityOptions

Host-controlled optional runtime capability toggles. 由宿主控制的可选运行时能力开关集合。

Implementations§

Source§

impl LuaRuntimeHostOptions

Source

pub fn with_runtime_root(runtime_root: impl Into<PathBuf>) -> Self

Build host options from one canonical runtime root and its fixed derived layout. 基于单个规范运行时根目录及其固定派生布局构造宿主选项。

Source

pub fn runtime_layout(&self) -> Option<LuaRuntimeLayout>

Return the fixed layout when a canonical runtime root has been configured. 当已配置规范运行时根目录时返回固定布局。

Source

pub fn apply_runtime_root_layout(&mut self)

Apply the fixed runtime-root layout to all legacy directory fields. 将固定 runtime-root 布局应用到所有兼容目录字段。

Source

pub fn normalized(self) -> Self

Return a normalized copy where runtime_root owns legacy derived paths and explicit managed roots remain intact. 返回一份规范化副本,其中 runtime_root 拥有旧有派生路径,显式受管根保持不变。

Trait Implementations§

Source§

impl Clone for LuaRuntimeHostOptions

Source§

fn clone(&self) -> LuaRuntimeHostOptions

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LuaRuntimeHostOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for LuaRuntimeHostOptions

Source§

fn default() -> LuaRuntimeHostOptions

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for LuaRuntimeHostOptions

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for LuaRuntimeHostOptions

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<T> MaybeSync for T
where T: Sync,

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> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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