config
Module: config
Section titled “Module: config”Contents
Section titled “Contents”Structs
CapabilityLeaseConfig- Capability lease refresh settings.CommandMediatorConfig- Runtime command mediation settings for governed local execution.ExecutableLaunchPolicy- Per-executable CLI argument policy injected byfirma run.MountSpec- Mount entry passed to sandbox backends.NetworkPolicy- Network policy toggles used by backend implementations.ResolvedProfile- Resolved runtime profile after combining built-in defaults, optional fileSeccompPolicyConfig- Seccomp policy compilation settings for Linux bwrap backend.
Enums
CapabilitySource- Source for capability material.CommandMediatorEndpointSidecarEndpoint- Sidecar endpoint form used by the wrapper.
Functions
read_configured_profile- Read[run].profilefromfirma.toml, if present.resolve_profile- Resolve profile configuration for a run invocation.workspace_root- The project root a config pins: the directory holding its.firma/.
firma_run::config::CapabilityLeaseConfig
Section titled “firma_run::config::CapabilityLeaseConfig”Struct
Capability lease refresh settings.
Which action classes a session may hold is not part of this: every mint requests all of them and the policy set applied to the agent decides the grant. What remains here is local — the static seed source, the key that verifies issued tokens, and refresh timing.
Fields:
source: CapabilitySourcepublic_key_path: Option<std::path::PathBuf>- Raw Ed25519 public key used to verify Authority-issued capabilities.refresh_ratio: f64grace: std::time::Duration
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private229::Result<<__S as >::Ok, <__S as >::Error>
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
firma_run::config::CapabilitySource
Section titled “firma_run::config::CapabilitySource”Enum
Source for capability material.
Variants:
DisabledFile{ path: std::path::PathBuf }
Traits: Eq
Trait Implementations:
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private229::Result<<__S as >::Ok, <__S as >::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_run::config::CommandMediatorConfig
Section titled “firma_run::config::CommandMediatorConfig”Struct
Runtime command mediation settings for governed local execution.
Traits: Eq
Trait Implementations:
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private229::Result<<__S as >::Ok, <__S as >::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_run::config::CommandMediatorEndpoint
Section titled “firma_run::config::CommandMediatorEndpoint”Enum
Variants:
Tcp{ addr: std::net::SocketAddr }Unix{ path: std::path::PathBuf }
Traits: Eq
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private229::Result<<__S as >::Ok, <__S as >::Error>
firma_run::config::ExecutableLaunchPolicy
Section titled “firma_run::config::ExecutableLaunchPolicy”Struct
Per-executable CLI argument policy injected by firma run.
Traits: Eq
Trait Implementations:
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private229::Result<<__S as >::Ok, <__S as >::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_run::config::MountSpec
Section titled “firma_run::config::MountSpec”Struct
Mount entry passed to sandbox backends.
Traits: Eq
Trait Implementations:
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private229::Result<<__S as >::Ok, <__S as >::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_run::config::NetworkPolicy
Section titled “firma_run::config::NetworkPolicy”Struct
Network policy toggles used by backend implementations.
Fields:
enforce_network_namespace: boolfail_closed: bool
Traits: Eq
Trait Implementations:
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private229::Result<<__S as >::Ok, <__S as >::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_run::config::ResolvedProfile
Section titled “firma_run::config::ResolvedProfile”Struct
Resolved runtime profile after combining built-in defaults, optional file config, and CLI overrides.
Fields:
id: Stringbackend: crate::backend::BackendKindenv_passthrough: std::collections::BTreeSet<String>env_set: std::collections::BTreeMap<String, String>capability: CapabilityLeaseConfig
Trait Implementations:
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private229::Result<<__S as >::Ok, <__S as >::Error>
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_run::config::SeccompPolicyConfig
Section titled “firma_run::config::SeccompPolicyConfig”Struct
Seccomp policy compilation settings for Linux bwrap backend.
Traits: Eq
Trait Implementations:
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private229::Result<<__S as >::Ok, <__S as >::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
firma_run::config::SidecarEndpoint
Section titled “firma_run::config::SidecarEndpoint”Enum
Sidecar endpoint form used by the wrapper.
Variants:
Tcp{ addr: std::net::SocketAddr }Unix{ path: std::path::PathBuf }
Traits: Eq
Trait Implementations:
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private229::Result<<__S as >::Ok, <__S as >::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- FromStr
fn from_str(value: &str) -> Result<Self, <Self as >::Err>
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
firma_run::config::read_configured_profile
Section titled “firma_run::config::read_configured_profile”Function
Read [run].profile from firma.toml, if present.
Errors
Section titled “Errors”Returns an error when the file cannot be read or the [run] section
cannot be parsed as FileConfig.
fn read_configured_profile(path: &std::path::Path) -> Result<Option<String>, crate::error::RunError>firma_run::config::resolve_profile
Section titled “firma_run::config::resolve_profile”Function
Resolve profile configuration for a run invocation.
Errors
Section titled “Errors”Returns an error when profile resolution fails due to invalid inputs, parse errors, or resulting validation failures.
fn resolve_profile(args: &crate::runtime::RunInput) -> Result<ResolvedProfile, crate::error::RunError>firma_run::config::workspace_root
Section titled “firma_run::config::workspace_root”Function
The project root a config pins: the directory holding its .firma/.
This is the workspace firma run binds read-write when nothing configures
a mount. It is derived from where the config file is, never from the
process working directory, so a run launched from a subdirectory still gets
the whole project — and the value does not depend on how the config path
reached this process.
None means “no project root to derive”, and the caller supplies its own
fallback. Keeping that distinct from a derived path is what lets
firma config omit the mount only when this would reproduce it.
Rejects two roots that would hand the agent far more than a project:
$HOME, whose sensitive-path overlay covers only a fixed suffix list, and
the filesystem root. A config living in either still records its workspace
explicitly.
The derived root is absolute and free of ./..: it becomes a mount
source, and profile validation rejects a relative one. That normalization
is also what makes the $HOME comparison mean anything —
~/sub/../.firma/firma.toml names $HOME and must be refused like every
other spelling of it.
fn workspace_root(config_file: Option<&std::path::Path>, home: Option<&std::path::Path>) -> Option<std::path::PathBuf>