Skip to main content

Module config

Module config 

Source
Expand description

Harness configuration (TOML surface, versioned).

Structs§

HarnessConfig
Top-level harness configuration.

Enums§

ConfigSource
Where the effective configuration came from.

Constants§

CONFIG_SEARCH_PATHS
Well-known config locations probed in order when AV_CONFIG is unset. Project-local files (current directory) beat the per-user file the avctl setup wizard writes (see user_config_path).
CONFIG_VERSION
Config format version (evolution surface).
MAX_ONNX_DIMENSION
Upper bound on onnx_dimension. Most sentence-transformer models have <= 4096 dims (Nomic Embed v1.5 = 768, MiniLM = 384, e5-mistral = 4096, Ada-002 = 1536). 16k is a comfortable ceiling.
MAX_REQUEST_BYTES_CAP
Upper bound on max_request_bytes (512 MiB). A single request body should never legitimately need more; lifting this defeats the sandbox payload guard and lets one request pin half a GB of RAM.
MAX_SECONDS_INTERVAL
Upper bound on any _s seconds interval. 1 day is already far beyond any reasonable value; anything larger is almost certainly a unit-conversion error (someone thought the field was in ms).
MAX_WORKER_CHANNEL_CAPACITY
Upper bound on worker_channel_capacity. tokio::sync::mpsc::channel does not preallocate slots (it links chunks lazily under a Semaphore), but an oversized value still lets the per-shard buffers grow unboundedly under overload and hides real backpressure signals. 1M is orders of magnitude above realistic capacity — this bound is defence-in-depth against a fat-finger, not a hard OOM prevention.

Functions§

load_config
Load, apply environment overrides, and validate the effective config.
resolve_config_source
Resolve the configuration source without reading it.
user_config_path
Per-user config file (~/.agentvisor/agentvisor.toml), if the home directory is known.
user_config_path_from
Per-user config file inside home, as written by the avctl wizard.