Skip to main content

HarnessConfig

Struct HarnessConfig 

Source
pub struct HarnessConfig {
Show 90 fields pub config_version: u32, pub listen: String, pub upstream_url: String, pub tool_upstream_url: Option<String>, pub upstream_http2_prior_knowledge: bool, pub upstream_read_timeout_s: Option<u64>, pub mcp_request_timeout_s: Option<u64>, pub shutdown_drain_timeout_s: Option<u64>, pub shutdown_ready_drain_s: u64, pub upstream_chat_path: String, pub provider: String, pub upstream_api_key_env: Option<String>, pub upstream_api_key_file: Option<String>, pub upstream_auth_header: String, pub upstream_auth_scheme: String, pub upstream_authorization_passthrough: bool, pub ignore_client_authorization: bool, pub tool_upstream_bearer_env: Option<String>, pub tool_upstream_bearer_file: Option<String>, pub require_identity: bool, pub allow_wildcard_bind: bool, pub audience: String, pub identity_jwks_url: Option<String>, pub identity_jwks_refresh_s: u64, pub identity_allowed_issuers: Vec<String>, pub identity_hmac_secret_file: Option<String>, pub identity_hmac_kid: String, pub max_delegation_depth: usize, pub identity_human_subject_pattern: Option<String>, pub enforce_identity_scopes: bool, pub chat_scope: String, pub session_close_scope: String, pub session_promote_scope: String, pub default_workflow: String, pub consequential_tools: Vec<String>, pub tool_schema_dir: Option<String>, pub require_tool_schema: bool, pub payout_field: String, pub wasm_policy_paths: Vec<String>, pub session_idle_close_s: u64, pub atif_spool_dir: String, pub bridge_data_dir: String, pub bridge_backend: String, pub bridge_manifest_path: String, pub bridge_endpoint: Option<String>, pub state_backend: String, pub state_endpoint: Option<String>, pub embedder_backend: String, pub onnx_model_path: Option<String>, pub onnx_tokenizer_path: Option<String>, pub onnx_dimension: usize, pub vector_backend: String, pub qdrant_url: Option<String>, pub qdrant_collection: String, pub worker_channel_capacity: usize, pub mcp_concurrency: usize, pub strict_stage_budget: bool, pub breaker: BreakerConfig, pub compression_enabled: bool, pub budget: BudgetSpec, pub principal_budget: Option<BudgetSpec>, pub allow_anonymous_principal_budget: bool, pub reconcile_tick_s: u64, pub atif_retention_days: Option<u32>, pub max_request_bytes: usize, pub dashboard_enabled: bool, pub allowed_hosts: Vec<String>, pub backends: Vec<BackendConfig>, pub require_private_backends: bool, pub tool_upstream_transport: BackendTransport, pub mcp_allowed_origins: Vec<String>, pub intent_map: BTreeMap<String, String>, pub require_intent_mapping: bool, pub mission: Option<MissionConfig>, pub missions: Vec<MissionConfig>, pub intent_token_ttl_s: u64, pub workload_identity: Option<WorkloadIdentityConfig>, pub workload_identities: Vec<WorkloadMapping>, pub authzen: Option<AuthzenConfig>, pub token_exchange_enabled: bool, pub token_exchange_seed_file: Option<String>, pub token_exchange_ttl_s: u64, pub operator_tokens: Vec<OperatorTokenConfig>, pub introspection_tokens: Vec<IntrospectionTokenConfig>, pub revocation_audit_per_minute: u32, pub otel_tenant_endpoint: Option<String>, pub otel_tenant_auth_file: Option<String>, pub otel_tenant_content: TenantContent, pub redaction_patterns: Vec<String>, pub redaction_paths: Vec<String>,
}
Expand description

Top-level harness configuration.

Unknown keys are rejected (deny_unknown_fields) so a typo like idel_timeout_s fails loudly at startup instead of being silently ignored. Forward compatibility is handled by config_version gating, not by tolerating unrecognized keys.

Fields§

§config_version: u32

Config format version.

§listen: String

Listen address, e.g. 127.0.0.1:8484.

§upstream_url: String

Upstream LLM provider base URL (OpenAI-compatible).

§tool_upstream_url: Option<String>

Optional downstream MCP/REST tool server URL. When absent, /v1/mcp operates as a policy decision endpoint.

§upstream_http2_prior_knowledge: bool

Use cleartext HTTP/2 prior knowledge for trusted h2c upstreams.

§upstream_read_timeout_s: Option<u64>

Optional upstream read-idle timeout override (default 60 s). Successful reads restart this timer. It does not bound total streamed-chat duration. Capped at one day like every _s interval.

§mcp_request_timeout_s: Option<u64>

Total outbound MCP deadline, including response-body reads. The default is 60 s; this also bounds tool work after caller cancellation. This does not impose a total deadline on streamed chat responses.

§shutdown_drain_timeout_s: Option<u64>

Graceful-shutdown drain budget in seconds. When unset the effective budget is max(30, max(upstream_read_timeout_s, mcp_request_timeout_s) + 5), using each field’s default when unset. This covers one read-idle window or MCP network deadline with padding; long chat streams and audit work may exceed it. Kubernetes users must keep terminationGracePeriodSeconds above this value or the kubelet SIGKILLs mid-drain.

§shutdown_ready_drain_s: u64

Readiness-controlled pre-drain window in seconds (default 0). On SIGTERM/SIGINT the harness flips /readyz to 503 and then KEEPS ACCEPTING connections for this long before the graceful drain begins, so an external load balancer polling /readyz can stop routing before the listener closes. Without it the listener stops accepting the instant the signal lands and a fresh readiness probe sees connection-refused, never the 503. Set it to your LB’s readiness poll interval plus one reconciliation. Counts against the orchestrator’s kill grace period ON TOP of the drain budget.

Kubernetes note: a preStop sleep hook can theoretically provide the same window BEFORE SIGTERM lands, but only if the runtime image contains a shell + sleep. The shipped manifest at deploy/kubernetes/agentvisor-ai.yaml uses a distroless base (chainguard/glibc-dynamic) that has neither, so it sets this key instead and omits the preStop hook. Bare-VM, systemd, and docker-compose deployments also need this key because they have no preStop equivalent at all.

§upstream_chat_path: String

Chat-completions path appended to upstream_url. Override for providers with non-standard layouts (Azure deployments, Gemini’s OpenAI-compatible surface).

§provider: String

The upstream provider’s wire dialect. Selects the ProviderAdapter that parses response bodies and SSE chunks. "openai" (the default) also fits vLLM, LiteLLM, Groq, Together, DeepSeek, OpenRouter, Ollama, LM Studio, llama.cpp, xAI, Mistral and Azure OpenAI.

§upstream_api_key_env: Option<String>

Name of an environment variable holding the upstream API key. The key value itself never appears in this file or on the command line.

§upstream_api_key_file: Option<String>

File containing the upstream API key (owner-only permissions are enforced on Unix). Mutually exclusive with upstream_api_key_env.

§upstream_auth_header: String

Header carrying the upstream API key, e.g. authorization (OpenAI), api-key (Azure), or x-api-key.

§upstream_auth_scheme: String

Prefix inserted before the key in the auth header. "Bearer" yields Bearer <key>; an empty string sends the raw key (Azure style).

§upstream_authorization_passthrough: bool

Forward each client’s own Authorization header to the upstream instead of injecting a server-side key. Incompatible with require_identity (the header would carry the NHI token) and with the static key options above.

§ignore_client_authorization: bool

Accept and DISCARD a client Authorization header when no identity validator is configured. This is the “hero snippet” mode: every stock OpenAI SDK requires an api_key and sends Authorization: Bearer <it> unconditionally, but a dev harness with no validator used to hard-401 that request — making the documented one-line quickstart fail on request one. With this flag the header is treated as if absent: the request proceeds anonymously, the header is NEVER forwarded upstream (the server-side key is injected instead), and nothing is recorded from it. Refused in combination with require_identity = true (the validator must see the header) and with upstream_authorization_passthrough = true (contradictory: cannot both discard and forward). avctl init writes this for dev presets so the README quickstart works out of the box.

§tool_upstream_bearer_env: Option<String>

Name of an environment variable holding a bearer token for tool_upstream_url requests.

§tool_upstream_bearer_file: Option<String>

File containing a bearer token for tool_upstream_url requests (owner-only permissions enforced on Unix).

§require_identity: bool

Identity enforcement. When false (dev), requests without a token get an anonymous identity; when true, unauthenticated requests are 401s.

§allow_wildcard_bind: bool

Explicit opt-in for binding to a wildcard address (0.0.0.0 / [::]) while require_identity = false. Set this only when a network layer outside the harness — a container port map, a service mesh, an ingress ACL — controls who can reach the listener. Startup validation otherwise refuses the combination so a bare-metal cargo run on a developer laptop cannot silently expose an anonymous provider proxy to a corporate LAN.

§audience: String

Deployment audience for NHI tokens.

§identity_jwks_url: Option<String>

Corporate IdP JWKS endpoint for Ed25519 verification keys.

§identity_jwks_refresh_s: u64

JWKS refresh interval in seconds.

§identity_allowed_issuers: Vec<String>

Optional issuer allowlist (for example Okta or Entra tenant URLs).

§identity_hmac_secret_file: Option<String>

Optional file containing an HS256 development secret.

§identity_hmac_kid: String

Key id assigned to the development HMAC secret.

§max_delegation_depth: usize

Maximum delegation depth for NHI token chains. Controls both parent_token chain links and act claim nesting. Defaults to 4.

§identity_human_subject_pattern: Option<String>

Regular expression every validated token’s sub must match, so each agent identity is attributable to a human principal (for example ^user:). Tokens whose subject does not match are refused with 401. Unset (the default) accepts any subject.

§enforce_identity_scopes: bool

Enforce operation scopes on validated identities.

Default flipped from true to false so it matches the also-default-false posture of Self::require_identity. When require_identity = false, unauthenticated requests short-circuit to the anonymous identity BEFORE the scope gate runs — an operator who reads enforce_identity_scopes = true in the config would reasonably conclude “you need the scope to reach /v1/chat”, but in the default posture curl-with-no-header still proceeds as anonymous. validate() now rejects the enforce_identity_scopes = true && require_identity = false combination outright; keeping the two defaults aligned makes the shipped harness.example.toml and harness.container.toml pass validate without extra changes. Operators turning on identity enforcement in production set both flags to true explicitly (see harness.docker.toml).

§chat_scope: String

Scope required for chat completion requests.

§session_close_scope: String

Scope required to close sessions.

§session_promote_scope: String

Scope required to promote unsigned sessions.

§default_workflow: String

Default workflow when X-AV-Workflow is absent: signed workflows are opt-in by policy (brief Module G).

§consequential_tools: Vec<String>

Tools that require a signed workflow because they have real-world consequences.

§tool_schema_dir: Option<String>

Directory containing one JSON Schema per tool, named <tool>.json.

§require_tool_schema: bool

Reject tool calls when no matching schema was loaded.

§payout_field: String

Tool-call argument field carrying a payout amount in USD, charged against budget.max_payout_usd_micros. This was a hardcoded "amount_usd" buried in the sandbox constructor — a tool using amount, value, or total_usd silently bypassed the payout cap with no warning. Set this to match YOUR tool schema; the cap only fires on calls that carry this exact field.

§wasm_policy_paths: Vec<String>

WASM or WAT policy module paths, evaluated in order.

§session_idle_close_s: u64

Idle seconds after which a session is swept closed.

§atif_spool_dir: String

Directory for ATIF trajectory spool files.

§bridge_data_dir: String

Bridge data directory (embedded broker).

§bridge_backend: String

Bridge backend: embedded, kafka, or nats.

§bridge_manifest_path: String

Declarative topic-schema manifest used by every Bridge backend.

§bridge_endpoint: Option<String>

Kafka broker (host:port[,host:port]) or NATS URL (nats:///tls://) for network Bridge backends. Secured endpoints read their material from the environment: AV_KAFKA_CA_FILE + AV_KAFKA_SASL_USERNAME/ AV_KAFKA_SASL_PASSWORD (+ optional AV_KAFKA_SASL_MECHANISM: SCRAM-SHA-256 default, SCRAM-SHA-512, or PLAIN; credentials are refused without the CA), and AV_NATS_CA_FILE (forces TLS) + AV_NATS_USER/AV_NATS_PASSWORD.

§state_backend: String

State backend: memory or redis.

§state_endpoint: Option<String>

Redis URL for the distributed state backend. A comma-separated list of URLs selects Redis Cluster mode.

§embedder_backend: String

Embedding backend: hash or onnx.

§onnx_model_path: Option<String>

Customer-supplied ONNX model path.

§onnx_tokenizer_path: Option<String>

Hugging Face tokenizer.json paired with the ONNX model.

§onnx_dimension: usize

ONNX model output width.

§vector_backend: String

Vector persistence backend: memory or qdrant.

§qdrant_url: Option<String>

Qdrant base URL.

§qdrant_collection: String

Qdrant collection receiving reasoning vectors.

§worker_channel_capacity: usize

Worker channel capacity (bounded; overflow is counted, never blocking).

§mcp_concurrency: usize

Max concurrent mcp_call_inner executions. Each call buffers up to MAX_TOOL_RESPONSE_BYTES = 16 MiB (routes.rs), so the admission cap × 16 MiB bounds worst-case MCP resident memory. R70 F1 (landed R71): without this cap a slow-tool-upstream attack + N concurrent MCP callers stacked N × 16 MiB in RAM unbounded — the mcp_inflight tracker was a shutdown-drain COUNTER, not a limiter.

Default 128 (~2 GiB worst case). The MAX_MCP_CONCURRENCY cap below refuses any config value above 4 096 for the same class-safety reason as MAX_WORKER_CHANNEL_CAPACITY.

§strict_stage_budget: bool

Strict per-stage budget assertions (AV_STRICT_BUDGET also enables).

§breaker: BreakerConfig

Loop breaker configuration.

§compression_enabled: bool

Compression configuration.

§budget: BudgetSpec

Token budget per session (compression/velocity accounting).

§principal_budget: Option<BudgetSpec>

Optional principal-scoped budget layered on top of Self::budget.

The default [budget] counters are keyed on the request’s session id — a header the caller chooses (see Self::require_identity). A client that rotates X-AV-Session per request lands on a virgin counter every time, so budget.max_tokens and friends never bind. Setting [principal_budget] layers a second budget keyed on the authenticated principal (the JWT sub / instance_uid, or the HMAC key id); the counters accumulate across every session belonging to that principal, so header rotation debits the same ledger.

Startup validation refuses this section when require_identity = false unless allow_anonymous_principal_budget = true is also set: without a stable principal every request folds into a single "anonymous" bucket, which is only useful in a single-tenant appliance deployment where that is the desired behaviour.

§allow_anonymous_principal_budget: bool

Opt-in for [principal_budget] while require_identity = false. See the field-level doc on Self::principal_budget.

§reconcile_tick_s: u64

Reconciler tick interval (seconds).

§atif_retention_days: Option<u32>

Days after which sealed ATIF trajectories and their .atif-auth provenance sidecars are pruned from the spool. None (the shipping default) preserves prior behaviour — the ATIF spool grows without bound, matching an on-prem deployment that manages retention with an external cron. Setting a positive value enables a periodic prune sweep that removes pairs older than the window, keeping the reconciler’s per-tick scan cost bounded even for high-throughput deployments.

§max_request_bytes: usize

Maximum request body size accepted on /v1/chat/completions and /mcp. Defaults to 4 MiB, matching the sandbox’s MAX_PAYLOAD_BYTES so both routes carry the same effective limit — axum’s own DefaultBodyLimit::MAX is 2 MiB by default and would silently reject legitimate large-context chat requests before the sandbox even saw the payload. Operators serving very-long-context models (Claude 200k, GPT-4 128k on maximally-verbose inputs) may need to raise this.

§dashboard_enabled: bool

Whether the built-in read-only operator dashboard is enabled.

When true (the default), the harness serves:

  • GET /dashboard — an HTML/CSS/JS single-page dashboard,
  • GET /dashboard/{style.css,app.js} — the bundled assets,
  • GET /api/v1/dashboard/{stats,sessions,sessions/:id} — read-only JSON that mirrors the in-memory session registry.

The endpoints are unauthenticated: they expose the same data that already lands on disk (receipts) and in /metrics. Front the harness with the same ingress control you use for /metrics if this is a concern, or set this to false to disable them.

§allowed_hosts: Vec<String>

Host-header allowlist (DNS-rebinding defense).

Empty (the default) disables the check — correct for loopback-only binds and for deployments whose ingress already enforces Host. When non-empty, every request whose Host header (port stripped) is not in this list is refused with 403 BEFORE any handler runs. DNS rebinding lets a hostile page’s JavaScript reach a loopback-adjacent service under a hostname the attacker controls; browser CSRF protections don’t apply because the resolved IP is ours while the Host is theirs — pinning the expected hostnames closes it. Example: allowed_hosts = ["localhost", "127.0.0.1", "agentvisor.internal"].

§backends: Vec<BackendConfig>

Named backends that MCP tool calls can be routed to. Each entry defines a name, URL, and auth policy. When absent, the single tool_upstream_url is used as an implicit “default” backend.

§require_private_backends: bool

Refuse to connect to any tool backend (including tool_upstream_url) whose address is not private: loopback, RFC 1918, shared (RFC 6598), link-local, or IPv6 unique-local. Host names are resolved and checked on every connection; IP literals are checked at boot. The LLM upstream and the AuthZEN PDP are not affected.

§tool_upstream_transport: BackendTransport

Wire protocol for the implicit backend built from tool_upstream_url. Defaults to json_rpc (one plain JSON-RPC POST per call, the historical behavior); set mcp when that upstream is an MCP Streamable HTTP server. [[backends]] entries choose their own transport and default to mcp.

§mcp_allowed_origins: Vec<String>

Browser origins allowed to call the MCP endpoints. The MCP Streamable HTTP transport requires servers to refuse requests whose Origin header is present and not allowed (DNS-rebinding defense). Agents run server-side and send no Origin, so the default (empty) refuses every request that carries one. Entries are exact origins, for example https://console.example.com.

§intent_map: BTreeMap<String, String>

Tool-name → business-intent mapping. An unmapped tool is refused with UNMAPPED_TOOL when require_intent_mapping is true.

§require_intent_mapping: bool

When true, every tool call must have an entry in intent_map or it is refused with UNMAPPED_TOOL. Defaults to false for backward compatibility.

§mission: Option<MissionConfig>

Active mission constraints. A mission narrows the static policy: only the listed intents are permitted while the mission is active. When absent, all mapped intents are permitted.

§missions: Vec<MissionConfig>

Per-agent missions (TOML [[missions]]). Each entry names the agents, charters, or human principals it applies to. A call must satisfy the global [mission] and every mission that selects its caller, so missions only ever narrow the static policy.

§intent_token_ttl_s: u64

Intent token TTL in seconds. Defaults to 60 (the AuthZEN recommendation for short-lived per-call tokens).

§workload_identity: Option<WorkloadIdentityConfig>

Platform workload identity (TOML [workload_identity]): accept RFC 7523 assertions signed with a Cloud Foundry instance identity at /v1/token and issue agent tokens to the registered workloads.

§workload_identities: Vec<WorkloadMapping>

Workloads that may obtain agent tokens (TOML [[workload_identities]]). Each names the human principal its agents act for.

§authzen: Option<AuthzenConfig>

External AuthZEN policy decision point consulted on every tool call after the local intent and mission checks permit it (TOML [authzen]). Both must permit. Unreachable PDP → 503.

§token_exchange_enabled: bool

Enable the RFC 8693 token exchange endpoint at /v1/token. When true, the harness signs exchanged tokens with a dedicated Ed25519 key (separate from the receipt signer).

§token_exchange_seed_file: Option<String>

File containing the Ed25519 signing seed for token exchange. Must be distinct from the receipt signing seed. Owner-only permissions enforced on Unix.

§token_exchange_ttl_s: u64

TTL in seconds for exchanged tokens. Defaults to 300 (five minutes). Capped at 900 to prevent indefinite delegation.

§operator_tokens: Vec<OperatorTokenConfig>

Named operator credentials authorized for administrative revocation. Only SHA-256 digests are stored in configuration.

§introspection_tokens: Vec<IntrospectionTokenConfig>

Separate backend credentials for the token introspection endpoint.

§revocation_audit_per_minute: u32

Maximum revocation audit events per minute. Defaults to 600.

§otel_tenant_endpoint: Option<String>

Per-tenant OTEL exporter endpoint. When set, full-fidelity traces are shipped to the customer’s own collector.

§otel_tenant_auth_file: Option<String>

File containing the bearer token for the tenant OTEL endpoint. Owner-only permissions enforced on Unix.

§otel_tenant_content: TenantContent

What the tenant OTEL endpoint receives beyond request metadata. redacted (the default) also exports every audited step as an OpenTelemetry GenAI span with its content (prompts, outputs, tool arguments and results), after redaction; off exports metadata spans only. Content never goes to the operational collector.

§redaction_patterns: Vec<String>

Sensitive-data redaction patterns (regex). Applied to event payloads and ATIF step fields before journal write.

§redaction_paths: Vec<String>

JSON pointer paths to always redact in event payloads and structured ATIF fields. Setting either paths or patterns also enables builtins.

Implementations§

Source§

impl HarnessConfig

Source

pub fn tenant_otel_authorization(&self) -> Result<Option<HeaderValue>, String>

Read the optional tenant telemetry bearer token using the same owner-only secret-file checks as backend credentials.

Source

pub fn from_toml(s: &str) -> Result<Self, String>

Parse from TOML, validating the version and structural sanity.

Source

pub fn from_toml_unvalidated(s: &str) -> Result<Self, String>

Parse from TOML without validating, so environment overrides can be applied first (main validates after Self::apply_env_overrides).

Source

pub fn builtin() -> Result<Self, String>

A config of pure built-in defaults for zero-config startup. The caller must supply upstream_url (typically AV_UPSTREAM_URL) before validation.

Source

pub fn uses_default_manifest_path(&self) -> bool

True when bridge_manifest_path is the compiled-in default, i.e. the operator never chose a manifest. Only then may the binary fall back to its embedded manifest when the file is absent; an explicit path that is missing must stay a hard error.

Source

pub fn uses_default_tool_schema_dir(&self) -> bool

True when tool_schema_dir is the compiled-in default (see Self::uses_default_manifest_path for the fallback rationale).

Source

pub fn is_default_policy_path(path: &str) -> bool

True when path is the compiled-in default WASM policy entry (see Self::uses_default_manifest_path for the fallback rationale).

Source

pub fn effective_drain_timeout(&self) -> Duration

Effective graceful-shutdown drain budget. Explicit shutdown_drain_timeout_s wins; otherwise allow the greater of one upstream read-idle window and the total MCP network deadline, plus five seconds, with a 30-second floor. Long streamed chat responses and audit work are still subject to this shutdown deadline.

Source

pub fn duplicated_chat_path_segment(&self) -> Option<&str>

Detect the classic footgun of upstream_url already ending with the first segment of upstream_chat_path (for example a base URL of https://api.openai.com/v1 joined with /v1/chat/completions produces /v1/v1/... and a confusing provider 404). Returns the duplicated segment for warning messages.

Source

pub fn apply_env_overrides(&mut self)

Apply AV_* environment overrides from the process environment. Environment beats file for these scalars (12-factor container deployments override without editing mounted files). Key values are still never read here — only AV_UPSTREAM_API_KEY presence selects itself as the key source.

Source

pub fn apply_env_overrides_from(&mut self, get: impl Fn(&str) -> Option<String>)

Testable core of Self::apply_env_overrides.

Source

pub fn bridge(&self) -> Result<BridgeBackend, String>

Resolve bridge_backend + bridge_endpoint into the typed BridgeBackend. This is the single site owning the legal-value vocabulary and the required-companion rule for the bridge selector; validate() and the daemon’s bridge factory both delegate here, so “kafka without an endpoint” cannot survive parsing.

Source

pub fn state(&self) -> Result<StateBackend, String>

Resolve state_backend + state_endpoint into the typed StateBackend (see Self::bridge for the single-parse-site rationale).

Source

pub fn embedder(&self) -> Result<EmbedderBackend, String>

Resolve embedder_backend + the ONNX companion paths into the typed EmbedderBackend (see Self::bridge).

Source

pub fn vector(&self) -> Result<VectorBackend, String>

Resolve vector_backend + qdrant_url into the typed VectorBackend (see Self::bridge).

Source

pub fn backends(&self) -> Result<ResolvedBackends, Vec<String>>

Resolve all four backend selectors at once. Errors accumulate — one entry per selector that fails to resolve — matching validate()’s report-everything behaviour.

Source

pub fn unsupported_backend_requirements(&self) -> Vec<String>

Backends this configuration selects that the current build cannot run because the required cargo feature was compiled out (avctl config-validate once reported “valid” for bridge_backend = "kafka" on a default-features binary; the daemon then hard-failed at boot — neither pre-flight tool knew what the binary could actually run). Returns one message per unsatisfiable selection; empty means every configured backend is compiled in. validate() deliberately does NOT fold this in: shape validity and build capability are different questions (a config can be valid for a --features full daemon while the avctl doing the pre-flight was built lean). Selections that fail to resolve into their typed backend are skipped here — validate() already refuses them, and every caller (daemon boot, doctor, config-validate) validates first.

Source

pub fn validate(&self) -> Result<(), String>

Structural validation. Returns the single violation verbatim (historical error shape) or, for multiple violations, a numbered aggregate naming all of them.

Trait Implementations§

Source§

impl Clone for HarnessConfig

Source§

fn clone(&self) -> HarnessConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HarnessConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for HarnessConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for HarnessConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSend for T
where T: Any + Send,

§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> CloneAny for T
where T: Any + Clone,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,