identity
Module: identity
Section titled “Module: identity”Contents
Section titled “Contents”Structs
RunIdentity- Stable identity tuple associated with afirma runinvocation.
Functions
read_configured_agent_id- Read and validate the registered agentTypeIDfromfirma.toml.reject_reserved_sandbox_id_environment- Reject an operator-provided sandbox identity beforefirma runperformsreject_reserved_session_id_environment- Refuses a managed run whose environment would override the session the
firma_run::identity::RunIdentity
Section titled “firma_run::identity::RunIdentity”Struct
Stable identity tuple associated with a firma run invocation.
Values are generated once per run and then reused everywhere in the runtime to keep attribution stable.
Fields:
sandbox_id: firma_identifiers::SandboxId
Methods:
fn new<impl Into<String>>(agent_id: AgentId, execution_profile: impl Trait) -> Self- Create a new run identity for a registered agent and execution profile.fn managed<impl Into<String>>(agent_id: AgentId, execution_profile: impl Trait, run_id: RunId) -> Self- The identity of a managed run: its session is the run thefn env_pairs(self: &Self) -> BTreeMap<String, String>- Environment variables injected into the wrapped process forfn full_attribution_headers(self: &Self) -> BTreeMap<String, String>- Full set of attribution headers including agent and host-user identity.
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
- Deserialize
fn deserialize<__D>(__deserializer: __D) -> _serde::__private229::Result<Self, <__D as >::Error>
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
firma_run::identity::read_configured_agent_id
Section titled “firma_run::identity::read_configured_agent_id”Function
Read and validate the registered agent TypeID from firma.toml.
Errors
Section titled “Errors”Returns a typed missing, profile-valued, malformed TypeID, or config parse
error. The returned [AgentId] always contains the canonical agt TypeID.
fn read_configured_agent_id(path: &std::path::Path) -> Result<firma_identifiers::AgentId, crate::error::RunError>firma_run::identity::reject_reserved_sandbox_id_environment
Section titled “firma_run::identity::reject_reserved_sandbox_id_environment”Function
Reject an operator-provided sandbox identity before firma run performs
configuration or filesystem work.
Errors
Section titled “Errors”Returns [crate::error::RunError::ReservedSandboxIdEnvironment] whenever
FIRMA_RUN_SANDBOX_ID is present, including with an empty value.
fn reject_reserved_sandbox_id_environment() -> Result<(), crate::error::RunError>firma_run::identity::reject_reserved_session_id_environment
Section titled “firma_run::identity::reject_reserved_session_id_environment”Function
Refuses a managed run whose environment would override the session the run fixes.
Errors
Section titled “Errors”Returns [RunError::ReservedSessionIdEnvironment] when
FIRMA_RUN_SESSION_ID is set.
fn reject_reserved_session_id_environment() -> Result<(), crate::error::RunError>