pub struct AgentsConfig {
pub agents_txt: bool,
pub ai_plugin: bool,
pub mcp: McpConfig,
pub rules: HashMap<String, AgentRule>,
pub default_rule: Option<AgentRule>,
}Expand description
The [agents] section of ssg.toml. Every field is optional;
absent values fall back to safe “off” defaults so that omitting
the section produces no new files.
Fields§
§agents_txt: boolEmit /agents.txt (a robots.txt-shaped agent policy file).
ai_plugin: boolEmit /.well-known/ai-plugin.json (OpenAI plugin manifest).
mcp: McpConfigMCP registry settings. Absent ⇒ disabled.
rules: HashMap<String, AgentRule>Per-agent allow/disallow overrides keyed by agent identifier
(e.g. "gptbot", "claudebot"). The agent ID is preserved
in TOML lowercase but rendered in canonical case
(User-agent: GPTBot) by agents_txt::write_agents_txt.
default_rule: Option<AgentRule>Default User-agent: * rule. When None, a permissive
Allow: / + Disallow: /private/ default is emitted.
Implementations§
Source§impl AgentsConfig
impl AgentsConfig
Sourcepub const fn any_enabled(&self) -> bool
pub const fn any_enabled(&self) -> bool
Returns true when at least one emitter is enabled. When this
is false, the coordinator plugin is a complete no-op.
§Examples
use ssg::postprocess::agentic_discovery::AgentsConfig;
let mut cfg = AgentsConfig::default();
assert!(!cfg.any_enabled());
cfg.agents_txt = true;
assert!(cfg.any_enabled());Trait Implementations§
Source§impl Clone for AgentsConfig
impl Clone for AgentsConfig
Source§fn clone(&self) -> AgentsConfig
fn clone(&self) -> AgentsConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentsConfig
impl Debug for AgentsConfig
Source§impl Default for AgentsConfig
impl Default for AgentsConfig
Source§fn default() -> AgentsConfig
fn default() -> AgentsConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AgentsConfig
impl<'de> Deserialize<'de> for AgentsConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AgentsConfig
impl RefUnwindSafe for AgentsConfig
impl Send for AgentsConfig
impl Sync for AgentsConfig
impl Unpin for AgentsConfig
impl UnsafeUnpin for AgentsConfig
impl UnwindSafe for AgentsConfig
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
Mutably borrows from an owned value. Read more
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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 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>
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