Skip to main content

DurableConfig

Struct DurableConfig 

Source
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: bool

Master opt-in. When false, no journal is opened and behavior is identical to a build without the durable layer.

§backend: DurableBackend

Selected journal backend.

§encrypt_payload: bool

Encrypt 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).

§shared_db: bool

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: bool

P1 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: bool

P2 adapter: journal the orchestration /plan resume replan budget.

§scheduler: bool

P3 adapter: exactly-once scheduler job fire.

§subagent: bool

P4 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: u64

Group-commit interval for buffered appends, in milliseconds.

§journal_ack_timeout_ms: u64

Timeout for an acknowledged append before degrading to non-durable mode, in milliseconds.

§max_steps_per_execution: u32

In-execution step cap (soft fold at 90%, hard abort at 100%).

§max_payload_bytes: u64

Maximum payload size in bytes, enforced on both append and read.

§promise_poll_interval_secs: u64

Database fallback poll interval for parked promises, in seconds.

§max_parked_promises: u32

Above this many parked promises, resolution falls back to pure polling.

§retention: RetentionPolicy

Journal retention and compaction policy ([durable.retention]).

§key_id: u8

The 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

Source§

fn clone(&self) -> DurableConfig

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 DurableConfig

Source§

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

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

impl Default for DurableConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for DurableConfig

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 Eq for DurableConfig

Source§

impl PartialEq for DurableConfig

Source§

fn eq(&self, other: &DurableConfig) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for DurableConfig

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

impl StructuralPartialEq for DurableConfig

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

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

Source§

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

Source§

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

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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