handler
Module: local_exec::handler
Section titled “Module: local_exec::handler”Contents
Section titled “Contents”Structs
LocalExecHandler- Stateful handler for local-exec governance and management requests.LocalExecHandlerConfig- Construction arguments for [LocalExecHandler].LocalExecManagementRequest- JSON request sent by an operator (orfirma tokenCLI) to approve orLocalExecManagementResponse- JSON response sent back to the operator after a management command.LocalExecRequest- JSON request received fromfirma-runover the local-exec UDS endpoint.LocalExecResponse- JSON response sent back tofirma-run.
Enums
DefaultAction- Policy applied to every fresh local-exec request (no approval token).LocalExecDecision- Outcome of a governance decision, serialized as asnake_casestring on the wire.ManagementOutcome- Outcome of a management operation, serialized as asnake_casestring.
firma_sidecar::local_exec::handler::DefaultAction
Section titled “firma_sidecar::local_exec::handler::DefaultAction”Enum
Policy applied to every fresh local-exec request (no approval token).
Variants:
Allow- Allow all executions unconditionally.Deny- Deny all executions unconditionally.PendingHitl- Require human approval via the HITL token flow.
Traits: Copy, Eq
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- PartialEq
fn eq(self: &Self, other: &DefaultAction) -> bool
- Deserialize
fn deserialize<__D>(__deserializer: __D) -> _serde::__private228::Result<Self, <__D as >::Error>
- Clone
fn clone(self: &Self) -> DefaultAction
firma_sidecar::local_exec::handler::LocalExecDecision
Section titled “firma_sidecar::local_exec::handler::LocalExecDecision”Enum
Outcome of a governance decision, serialized as a snake_case string on the wire.
Variants:
AllowDenyPendingHitl
Traits: Eq, Copy
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- PartialEq
fn eq(self: &Self, other: &LocalExecDecision) -> bool
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
- Clone
fn clone(self: &Self) -> LocalExecDecision
- Deserialize
fn deserialize<__D>(__deserializer: __D) -> _serde::__private228::Result<Self, <__D as >::Error>
firma_sidecar::local_exec::handler::LocalExecHandler
Section titled “firma_sidecar::local_exec::handler::LocalExecHandler”Struct
Stateful handler for local-exec governance and management requests.
Holds an Arc<dyn [TokenStore]> and is safe to share across
connections. The default store is [InMemoryTokenStore]; alternative
backends (Redis, distributed stores, test doubles) are injected via
[LocalExecHandler::with_store].
Methods:
fn new(config: LocalExecHandlerConfig) -> Self- Build a handler using the default [InMemoryTokenStore].fn with_store(config: LocalExecHandlerConfig, store: Arc<dyn TokenStore>) -> Self- Build a handler with a custom token store.fn token_store(self: &Self) -> Arc<dyn TokenStore>- Return a shared reference to the token store.fn decide(self: &Self, request: &LocalExecRequest) -> LocalExecResponse- Produce a governance decision for one local-exec request.fn decide_management(self: &Self, request: &LocalExecManagementRequest) -> LocalExecManagementResponse- Process an operator management command (approve or revoke).
firma_sidecar::local_exec::handler::LocalExecHandlerConfig
Section titled “firma_sidecar::local_exec::handler::LocalExecHandlerConfig”Struct
Construction arguments for [LocalExecHandler].
Fields:
default_action: DefaultActiontoken_ttl: std::time::Duration- Time-to-live for issued approval tokens. Only used byretry_after_ms: u64- Suggested retry interval returned tofirma-runinpending_hitl
firma_sidecar::local_exec::handler::LocalExecManagementRequest
Section titled “firma_sidecar::local_exec::handler::LocalExecManagementRequest”Struct
JSON request sent by an operator (or firma token CLI) to approve or
revoke a pending approval token.
Fields:
action: String-"local.exec.approve"or"local.exec.revoke".token_id: String- Opaque token ID returned in the originalpending_hitlresponse.
Trait Implementations:
- Deserialize
fn deserialize<__D>(__deserializer: __D) -> _serde::__private228::Result<Self, <__D as >::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
firma_sidecar::local_exec::handler::LocalExecManagementResponse
Section titled “firma_sidecar::local_exec::handler::LocalExecManagementResponse”Struct
JSON response sent back to the operator after a management command.
Fields:
outcome: ManagementOutcomereason: Option<String>
Trait Implementations:
- Deserialize
fn deserialize<__D>(__deserializer: __D) -> _serde::__private228::Result<Self, <__D as >::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
firma_sidecar::local_exec::handler::LocalExecRequest
Section titled “firma_sidecar::local_exec::handler::LocalExecRequest”Struct
JSON request received from firma-run over the local-exec UDS endpoint.
Fields:
action: Stringexecutable: Stringargs: Vec<String>sandbox_id: Stringsession_id: Stringagent_id: Option<String>profile: Stringhitl_mode: Stringbudget_state_ref: Option<String>request_fingerprint: Option<String>- SHA-256 fingerprint computed byfirma-run. The sidecar recomputesapproval_token: Option<String>- Present only on retry attempts — the token ID issued in a prior
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
- Deserialize
fn deserialize<__D>(__deserializer: __D) -> _serde::__private228::Result<Self, <__D as >::Error>
firma_sidecar::local_exec::handler::LocalExecResponse
Section titled “firma_sidecar::local_exec::handler::LocalExecResponse”Struct
JSON response sent back to firma-run.
Fields:
decision: LocalExecDecisionreason: Option<String>approval_token: Option<String>retry_after_ms: Option<u64>
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
- Deserialize
fn deserialize<__D>(__deserializer: __D) -> _serde::__private228::Result<Self, <__D as >::Error>
firma_sidecar::local_exec::handler::ManagementOutcome
Section titled “firma_sidecar::local_exec::handler::ManagementOutcome”Enum
Outcome of a management operation, serialized as a snake_case string.
Variants:
OkNotFoundAlreadyConsumedAlreadyRevokedExpiredUnsupportedAction
Traits: Copy, Eq
Trait Implementations:
- PartialEq
fn eq(self: &Self, other: &ManagementOutcome) -> bool
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
- Clone
fn clone(self: &Self) -> ManagementOutcome
- Deserialize
fn deserialize<__D>(__deserializer: __D) -> _serde::__private228::Result<Self, <__D as >::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result