pub struct ResolveConfig {
pub base: PathBuf,
pub in_bp_includes: Vec<PathBuf>,
pub env_includes: Vec<PathBuf>,
pub cli_includes: Vec<PathBuf>,
pub config_includes: Vec<PathBuf>,
pub bundled_default: Option<PathBuf>,
}Expand description
Resolution config for $agent_md / $file refs. Ordered list of
directories the linker walks first-hit-wins across 6 tiers.
Tier order (highest priority first):
base— bp.lua parent directory (always tier 1).in_bp_includes— in-bp declaredblueprint_ref_includes(relative tobase).env_includes— envMSE_BLUEPRINT_INCLUDES(:- or;- separated absolute paths).cli_includes— CLI--include <path>repeatable.config_includes— server / config-fileblueprint_ref_includes.bundled_default— bundled fallback (typicallycrates/mlua-swarm-cli/src/mcp/resources/samples/agents/).
Callers construct the config via ResolveConfig::new and layer
additional tiers through the builder methods, then pass the config
to expand_file_refs_with_config.
Fields§
§base: PathBufbp.lua parent directory (always tier 1, always first).
in_bp_includes: Vec<PathBuf>In-bp declared includes (tier 2, relative to base).
env_includes: Vec<PathBuf>Env MSE_BLUEPRINT_INCLUDES (tier 3).
cli_includes: Vec<PathBuf>CLI --include <path> repeatable (tier 4).
config_includes: Vec<PathBuf>Server / config-file blueprint_ref_includes (tier 5).
bundled_default: Option<PathBuf>Bundled default (tier 6). None = no bundled fallback (typical
for server-side use, where the server never ships authoring
files).
Implementations§
Source§impl ResolveConfig
impl ResolveConfig
Sourcepub fn new(base: impl Into<PathBuf>) -> Self
pub fn new(base: impl Into<PathBuf>) -> Self
Build a config with only the base tier set. Callers layer the remaining tiers via builder methods.
Sourcepub fn with_in_bp_includes(self, v: Vec<PathBuf>) -> Self
pub fn with_in_bp_includes(self, v: Vec<PathBuf>) -> Self
Set the in-bp include list (tier 2). Paths are resolved relative
to base at search time.
Sourcepub fn with_env_includes(self, v: Vec<PathBuf>) -> Self
pub fn with_env_includes(self, v: Vec<PathBuf>) -> Self
Set the env include list (tier 3).
Sourcepub fn with_cli_includes(self, v: Vec<PathBuf>) -> Self
pub fn with_cli_includes(self, v: Vec<PathBuf>) -> Self
Set the CLI include list (tier 4).
Sourcepub fn with_config_includes(self, v: Vec<PathBuf>) -> Self
pub fn with_config_includes(self, v: Vec<PathBuf>) -> Self
Set the config-file include list (tier 5).
Sourcepub fn with_bundled_default(self, p: Option<PathBuf>) -> Self
pub fn with_bundled_default(self, p: Option<PathBuf>) -> Self
Set the bundled-default fallback (tier 6). Pass None to
disable the fallback (server-side default).
Sourcepub fn search_paths(&self) -> impl Iterator<Item = PathBuf> + '_
pub fn search_paths(&self) -> impl Iterator<Item = PathBuf> + '_
Iterate every configured directory in cascade order (tier 1 → 6).
in_bp_includes entries are joined onto base at iteration
time so callers can pass in relative paths as declared in the
bp.lua source.
Trait Implementations§
Source§impl Clone for ResolveConfig
impl Clone for ResolveConfig
Source§fn clone(&self) -> ResolveConfig
fn clone(&self) -> ResolveConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResolveConfig
impl Debug for ResolveConfig
Source§impl Default for ResolveConfig
impl Default for ResolveConfig
Source§fn default() -> ResolveConfig
fn default() -> ResolveConfig
Auto Trait Implementations§
impl Freeze for ResolveConfig
impl RefUnwindSafe for ResolveConfig
impl Send for ResolveConfig
impl Sync for ResolveConfig
impl Unpin for ResolveConfig
impl UnsafeUnpin for ResolveConfig
impl UnwindSafe for ResolveConfig
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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