pub struct LintEnv {
pub known_tools: HashSet<String>,
pub known_models: Vec<(String, String)>,
pub available_providers: Option<HashSet<String>>,
pub read_paths: Option<Result<GrantReport, String>>,
}Expand description
Facts about the machine the blueprint will run on, which the manifest alone cannot supply.
Every field is “unknown” when empty/None, and an unknown field skips its
check entirely rather than guessing. A linter that cannot see the installed
MCP servers must not claim their tools do not exist.
Fields§
§known_tools: HashSet<String>Every tool name a manifest may legally write: canonical built-ins, their
aliases, the sub-agent tools, this agent’s own tools/*.rhai, and any
MCP tools already resolved. Empty skips the unknown-tool check.
known_models: Vec<(String, String)>(provider, model) rows for providers whose catalog is closed enough to
check against. A provider with no row here is not checked at all, which
is what keeps open catalogs (Ollama, OpenRouter, script providers) from
producing noise.
available_providers: Option<HashSet<String>>The providers the blueprint names that this install can actually reach,
as answered by ProviderRegistry::has. None means nobody asked, so
the check is skipped. Resolution lives with the caller because script
providers are loaded on demand and cannot be enumerated up front.
read_paths: Option<Result<GrantReport, String>>Which of the blueprint’s [read_paths] this install’s config grants.
None means nobody asked (the daemon’s offline lint), in which case the
check only says that a declaration needs granting. Some(Err(..)) is a
grant list of the user’s own that will not compile.
Implementations§
Source§impl LintEnv
impl LintEnv
Sourcepub fn offline(agent_dir: &Path) -> Self
pub fn offline(agent_dir: &Path) -> Self
Everything that can be known without touching the user’s config: the
built-in tools (aliases included), the sub-agent tools, the script tools
in agent_dir/tools and the global tools directory, and the model
catalogs this build ships.
This is what the daemon lints against at spawn. It deliberately leaves
available_providers unset: the daemon already fails a spawn outright
when no listed provider is registered, so re-deriving that here would
cost a registry build per agent to say something the spawn will say
louder a moment later.
Sourcepub fn with_providers(self, blueprint: &Blueprint, config: &Config) -> Self
pub fn with_providers(self, blueprint: &Blueprint, config: &Config) -> Self
Add the answer to “can this install reach the providers the blueprint names”, asked of the same registry the runtime resolves stages against so a script provider counts exactly when it would really load.
Sourcepub fn with_read_paths(
self,
blueprint: &Blueprint,
config: &Config,
workdir: &Path,
) -> Self
pub fn with_read_paths( self, blueprint: &Blueprint, config: &Config, workdir: &Path, ) -> Self
Add the answer to “does this install’s config grant what the blueprint
declares under [read_paths]”, per entry.
Separate from Self::with_providers because it needs a workdir:
relative entries resolve against the one a run would use, which for a
command run outside a run is the directory it was invoked from.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LintEnv
impl RefUnwindSafe for LintEnv
impl Send for LintEnv
impl Sync for LintEnv
impl Unpin for LintEnv
impl UnsafeUnpin for LintEnv
impl UnwindSafe for LintEnv
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> FromTemplate for T
impl<T> FromTemplate for T
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Template for T
impl<T> Template for T
Source§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a Template::Output.Source§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.