pub struct WebSectionConfig {
pub timeout_default_s: Option<u64>,
pub timeout_max_s: Option<u64>,
pub max_bytes_default: Option<u64>,
pub max_bytes_max: Option<u64>,
pub search_limit_default: Option<u32>,
pub search_limit_max: Option<u32>,
pub allowlist: Vec<WebAllowlistEntry>,
pub credentials: Vec<WebCredentialConfig>,
pub search_providers: Vec<WebSearchProviderConfig>,
pub read_roots: Vec<String>,
}Expand description
[web] section (ADR-175 Amendment 1, ADR-191 D3): operator policy for
web.fetch and web.search — ceilings, the address allowlist, credential
host-set bindings, and configured search providers.
No generic per-pack settings map exists in this file today (PackConfig
carries only backend/no_embed, both storage-routing concerns) so this
follows the established precedent for a pack needing rich operator policy:
a dedicated top-level section threaded through RuntimeConfig, the same
shape as [exec] and [git_write].
[web]
timeout_default_s = 30
timeout_max_s = 120
max_bytes_default = 5242880
max_bytes_max = 52428800
search_limit_default = 10
search_limit_max = 50
[[web.allowlist]]
host = "example.com"
[[web.credentials]]
name = "example-token"
env_var = "EXAMPLE_API_TOKEN"
hosts = ["example.com"]
[[web.search_providers]]
kind = "fixture"
name = "demo"
default = true
results = [{ title = "Example", url = "https://example.com", snippet = "..." }]Fields§
§timeout_default_s: Option<u64>§timeout_max_s: Option<u64>§max_bytes_default: Option<u64>§max_bytes_max: Option<u64>§search_limit_default: Option<u32>§search_limit_max: Option<u32>§allowlist: Vec<WebAllowlistEntry>§credentials: Vec<WebCredentialConfig>§search_providers: Vec<WebSearchProviderConfig>§read_roots: Vec<String>Directories web.ingest’s disk mode may read from, modeled on
[exec] read_roots. Absent or empty fails closed: disk ingest is
refused entirely until the operator names at least one root.
Implementations§
Source§impl WebSectionConfig
impl WebSectionConfig
pub fn resolved_ceilings(&self) -> Result<WebCeilings, ConfigError>
pub fn validate(&self) -> Result<(), ConfigError>
Trait Implementations§
Source§impl Clone for WebSectionConfig
impl Clone for WebSectionConfig
Source§impl Debug for WebSectionConfig
impl Debug for WebSectionConfig
Source§impl Default for WebSectionConfig
impl Default for WebSectionConfig
Source§impl<'de> Deserialize<'de> for WebSectionConfig
impl<'de> Deserialize<'de> for WebSectionConfig
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 Forget for WebSectionConfig
impl Freeze for WebSectionConfigwhere
*const u8 is !null: Freeze,
PhantomData<WebAllowlistEntry>: Freeze,
PhantomData<WebCredentialConfig>: Freeze,
PhantomData<WebSearchProviderConfig>: Freeze,
PhantomData<String>: Freeze,
impl Move for WebSectionConfig
impl RefUnwindSafe for WebSectionConfig
impl Send for WebSectionConfigwhere
RawVecInner: Send,
impl Sync for WebSectionConfigwhere
RawVecInner: Sync,
impl Unpin for WebSectionConfig
impl UnsafeUnpin for WebSectionConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<WebAllowlistEntry>: UnsafeUnpin,
PhantomData<WebCredentialConfig>: UnsafeUnpin,
PhantomData<WebSearchProviderConfig>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for WebSectionConfigwhere
RawVecInner: UnwindSafe,
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>,
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> ⓘ
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