pub struct DurableConfig {Show 17 fields
pub enabled: bool,
pub backend: DurableBackend,
pub encrypt_payload: bool,
pub shared_db: bool,
pub agent_turns: bool,
pub orchestration: bool,
pub scheduler: bool,
pub subagent: bool,
pub journal_flush_interval_ms: u64,
pub journal_ack_timeout_ms: u64,
pub max_steps_per_execution: u32,
pub max_payload_bytes: u64,
pub promise_poll_interval_secs: u64,
pub max_parked_promises: u32,
pub retention: RetentionPolicy,
pub key_id: u8,
pub previous_key_id: Option<u8>,
}Expand description
Configuration for the durable execution layer ([durable]).
§Examples
use zeph_config::DurableConfig;
// An empty table deserializes to the spec defaults.
let cfg: DurableConfig = toml::from_str("").unwrap();
assert!(!cfg.enabled);
assert_eq!(cfg.journal_ack_timeout_ms, 5000);
assert_eq!(cfg.max_payload_bytes, 1_048_576);Fields§
§enabled: boolMaster opt-in. When false, no journal is opened and behavior is identical to a build
without the durable layer.
backend: DurableBackendSelected journal backend.
encrypt_payload: boolEncrypt payloads with AEAD. A false value is a development-only override (it emits a
startup warning) and is forbidden for non-local backends (INV-8).
Operator-declared flag: the durable journal database is reachable by more than one
process/client (a network-shared volume, or any future Postgres-backed durable
deployment). Required true for such deployments — enforced by encryption_gate
(INV-8), which forbids encrypt_payload = false when this is true. Default false
(an ordinary single-user local deployment).
agent_turns: boolP1 adapter: wrap agent-loop steps in durable steps.
When true (with enabled = true), every ordinary agent turn’s LLM call is journaled
via a DurableContext opened lazily on the session’s first turn (see
zeph_core::agent::Agent::ensure_session_durable_ctx, #5452). The execution is keyed on
the session’s ConversationId, so this adapter requires semantic memory ([memory]) to
be enabled — without it, conversation_id is never set and the agent degrades to
non-durable with a one-time tracing::warn! at bootstrap, even though agent_turns = true
looks fully enabled in the config.
orchestration: boolP2 adapter: journal the orchestration /plan resume replan budget.
scheduler: boolP3 adapter: exactly-once scheduler job fire.
subagent: boolP4 adapter: durable promise for subagent spawn/await.
Requires agent_turns = true as well: the durable seat is only attached when the
session’s DurableContext (populated by the agent_turns adapter) is already Some
(#5452).
journal_flush_interval_ms: u64Group-commit interval for buffered appends, in milliseconds.
journal_ack_timeout_ms: u64Timeout for an acknowledged append before degrading to non-durable mode, in milliseconds.
max_steps_per_execution: u32In-execution step cap (soft fold at 90%, hard abort at 100%).
max_payload_bytes: u64Maximum payload size in bytes, enforced on both append and read.
promise_poll_interval_secs: u64Database fallback poll interval for parked promises, in seconds.
max_parked_promises: u32Above this many parked promises, resolution falls back to pure polling.
retention: RetentionPolicyJournal retention and compaction policy ([durable.retention]).
key_id: u8The AEAD key-id byte stamped on every payload sealed with the current
ZEPH_DURABLE_KEY. Bumped by zeph durable rotate-key; an operator-controlled
selector so rotation needs no recompile. Default 0 matches every payload sealed
before this field existed.
previous_key_id: Option<u8>When set, the previous AEAD key (vault secret ZEPH_DURABLE_KEY_PREVIOUS) is
registered as the cipher’s rotation-window read slot. None means no rotation
window is open. Set and cleared by zeph durable rotate-key / --drop-previous —
not intended for manual editing outside of documented crash recovery.
Trait Implementations§
Source§impl Clone for DurableConfig
impl Clone for DurableConfig
Source§fn clone(&self) -> DurableConfig
fn clone(&self) -> DurableConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DurableConfig
impl Debug for DurableConfig
Source§impl Default for DurableConfig
impl Default for DurableConfig
Source§impl<'de> Deserialize<'de> for DurableConfigwhere
DurableConfig: Default,
impl<'de> Deserialize<'de> for DurableConfigwhere
DurableConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for DurableConfig
Source§impl PartialEq for DurableConfig
impl PartialEq for DurableConfig
Source§impl Serialize for DurableConfig
impl Serialize for DurableConfig
impl StructuralPartialEq for DurableConfig
Auto Trait Implementations§
impl Freeze for DurableConfig
impl RefUnwindSafe for DurableConfig
impl Send for DurableConfig
impl Sync for DurableConfig
impl Unpin for DurableConfig
impl UnsafeUnpin for DurableConfig
impl UnwindSafe for DurableConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.