Struct FilesystemConfig
pub struct FilesystemConfig {Show 13 fields
pub enabled: bool,
pub paths: Vec<String>,
pub recursive: bool,
pub include: Vec<String>,
pub exclude: Vec<String>,
pub events: Vec<String>,
pub debounce_ms: u64,
pub settle_ms: u64,
pub read_content: bool,
pub follow_symlinks: bool,
pub max_content_bytes: Option<usize>,
pub allow_broad_roots: bool,
pub excluded_tools: Vec<String>,
}Expand description
Filesystem SOP listener configuration.
Watches configured paths and dispatches file create/modify/delete/rename
events to the SOP engine. This is a fan-in listener, not a chat channel:
its Channel::send has no outbound surface.
Fields§
§enabled: boolWhether this channel is active. The runtime only loads channels whose
enabled = true. Default: false so an operator who pastes a partial
[channels.<type>.<alias>] block doesn’t accidentally bring a channel
live before the rest of its config is filled in.
paths: Vec<String>Root paths to watch. At least one is required.
recursive: boolWatch nested paths beneath each root.
include: Vec<String>Glob patterns to include. Empty matches all paths under the roots.
exclude: Vec<String>Glob patterns to exclude. Applied after include.
events: Vec<String>Event kinds to emit (created, modified, deleted, renamed).
debounce_ms: u64Collapse rapid repeated events per path/kind within this window.
settle_ms: u64Wait this long after the last event before reading metadata or content, giving atomic writes and slow copies time to finish.
read_content: boolRead file content into the event payload. Opt-in.
follow_symlinks: boolFollow symlinks when reading event-path metadata, hash, and content. Off by default: a symlink under a watched root is rejected before any metadata/hash/content handling so its target cannot escape the root. When on, the canonical target must still resolve inside a configured root.
max_content_bytes: Option<usize>Maximum file content bytes admitted into a payload when read_content,
and the size ceiling for hashing. Some(n) caps reads and hashing at
n bytes; oversize files are skipped rather than truncated. None
removes the ceiling entirely (unbounded reads). Defaults to
Some(65536) (64 KiB), so the cap applies by default whenever
read_content or hashing runs.
allow_broad_roots: boolWatch broad system roots (/, /home, /etc, /var, /proc,
/sys, /dev, /tmp) despite the deny-broad-roots default. The
pseudo-filesystems /proc and /sys would surface kernel object
paths in SOP payloads and flood the watcher with events. Off unless
explicitly enabled.
excluded_tools: Vec<String>Tools excluded from this channel’s tool spec.
Implementations§
Source§impl FilesystemConfig
impl FilesystemConfig
Sourcepub fn configurable_prefix() -> &'static str
pub fn configurable_prefix() -> &'static str
Returns the #[prefix] value for this Configurable struct.
Sourcepub fn secret_fields(&self) -> Vec<SecretFieldInfo>
pub fn secret_fields(&self) -> Vec<SecretFieldInfo>
Returns metadata about all #[secret] fields on this struct and nested children.
pub fn secret_field_terminals() -> Vec<&'static str>
Sourcepub fn encrypt_secrets(&mut self, store: &SecretStore) -> Result<()>
pub fn encrypt_secrets(&mut self, store: &SecretStore) -> Result<()>
Encrypt all secret fields in place using the provided store.
Sourcepub fn decrypt_secrets(&mut self, store: &SecretStore) -> Result<()>
pub fn decrypt_secrets(&mut self, store: &SecretStore) -> Result<()>
Decrypt all secret fields in place using the provided store.
Sourcepub fn set_secret(&mut self, name: &str, value: String) -> Result<()>
pub fn set_secret(&mut self, name: &str, value: String) -> Result<()>
Set a secret field by its full dotted name, dispatching to nested children.
Sourcepub fn prop_fields(&self) -> Vec<PropFieldInfo>
pub fn prop_fields(&self) -> Vec<PropFieldInfo>
Returns metadata about all property fields on this struct and nested children.
Sourcepub fn get_prop(&self, name: &str) -> Result<String>
pub fn get_prop(&self, name: &str) -> Result<String>
Get a property value by its full dotted name, returning it as a display string.
Sourcepub fn set_prop(&mut self, name: &str, value_str: &str) -> Result<()>
pub fn set_prop(&mut self, name: &str, value_str: &str) -> Result<()>
Set a property value by its full dotted name, parsing from string.
Sourcepub fn prop_is_secret(name: &str) -> bool
pub fn prop_is_secret(name: &str) -> bool
Check if a property name refers to a secret field (static, no instance needed).
Sourcepub fn init_defaults(&mut self, prefix: Option<&str>) -> Vec<&'static str>
pub fn init_defaults(&mut self, prefix: Option<&str>) -> Vec<&'static str>
Instantiate None nested sections whose prefix matches.
Returns the prefixes that were initialized.
Sourcepub fn map_key_sections() -> Vec<MapKeySection>
pub fn map_key_sections() -> Vec<MapKeySection>
Enumerate every map-keyed (HashMap<String, T>) and list-shaped
(Vec<T>) section discoverable from this Configurable’s tree.
The dashboard / CLI consume this to surface “+ Add” affordances
without hardcoding the section list.
Sourcepub fn nested_section_help(name: &str) -> Option<&'static str>
pub fn nested_section_help(name: &str) -> Option<&'static str>
Help blurb for a #[nested] field on this struct, sourced from
the field-level /// docstring. Returns None for unknown
names so callers can fall through to a different lookup.
pub fn nested_section_group(name: &str) -> Option<&'static str>
Sourcepub fn get_map_keys(&self, section_path: &str) -> Option<Vec<String>>
pub fn get_map_keys(&self, section_path: &str) -> Option<Vec<String>>
Return the current alias keys at section_path, or None if
the path doesn’t resolve to a map-keyed section in this tree.
pub fn nested_option_entries(&self) -> Vec<NestedOptionEntry>
pub fn create_map_key( &mut self, section_path: &str, map_key: &str, ) -> Result<bool, String>
pub fn delete_map_key( &mut self, section_path: &str, map_key: &str, ) -> Result<bool, String>
pub fn rename_map_key( &mut self, section_path: &str, map_key: &str, new_key: &str, ) -> Result<bool, String>
Trait Implementations§
Source§impl ChannelConfig for FilesystemConfig
impl ChannelConfig for FilesystemConfig
Source§impl Clone for FilesystemConfig
impl Clone for FilesystemConfig
Source§fn clone(&self) -> FilesystemConfig
fn clone(&self) -> FilesystemConfig
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FilesystemConfig
impl Debug for FilesystemConfig
Source§impl Default for FilesystemConfig
impl Default for FilesystemConfig
Source§impl<'de> Deserialize<'de> for FilesystemConfig
impl<'de> Deserialize<'de> for FilesystemConfig
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>,
Source§impl JsonSchema for FilesystemConfig
impl JsonSchema for FilesystemConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl MaskSecrets for FilesystemConfig
impl MaskSecrets for FilesystemConfig
fn mask_secrets(&mut self)
fn restore_secrets_from(&mut self, current: &Self)
Auto Trait Implementations§
impl Freeze for FilesystemConfig
impl RefUnwindSafe for FilesystemConfig
impl Send for FilesystemConfig
impl Sync for FilesystemConfig
impl Unpin for FilesystemConfig
impl UnsafeUnpin for FilesystemConfig
impl UnwindSafe for FilesystemConfig
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,
§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>
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