Skip to main content

SessionConfig

Struct SessionConfig 

Source
pub struct SessionConfig {
Show 15 fields pub continue_session: Option<Option<String>>, pub system: Option<String>, pub prompt_manifest: Option<PathBuf>, pub cwd: Option<PathBuf>, pub env: Option<SessionEnv>, pub env_stripped: Vec<String>, pub auto_approve_confirms: bool, pub model_override: Option<String>, pub persist: bool, pub auto_compact: bool, pub compaction_policy: CompactionPolicyWire, pub await_extensions: bool, pub keep_warm: bool, pub name: Option<String>, pub max_session_cost: Option<f64>,
}
Expand description

Everything EngineHost::create_session needs. Serializable: it is the payload of the wire Attach::Create. Mirrors EngineOpts minus the host-level fields (profile, no_extensions), plus the per-session facts a daemon cannot inherit from its own process (cwd, env overlay).

Fields§

§continue_session: Option<Option<String>>

EngineOpts.continue_session. Some(None) = bare --continue (most recent journal). Plain serde encodes Some(None) as null and decodes that as None, so the daemon could never receive a bare --continue (soak F21) — double_option keeps the two levels apart on the wire.

§system: Option<String>

EngineOpts.system.

§prompt_manifest: Option<PathBuf>

EngineOpts.prompt_manifest.

§cwd: Option<PathBuf>

Per-session working directory. None = process cwd (in-process hosts pass None today → byte-identical). The daemon ALWAYS fills it from Hello.cwd.

§env: Option<SessionEnv>

Per-session environment snapshot. None = inherit process env (in-process hosts). The daemon fills it from Hello.env on Attach::Create only; attaching to an existing session does not change the creator’s env.

§env_stripped: Vec<String>

Names of environment variables stripped as secrets at the client (e.g. GH_TOKEN, AWS_SECRET_ACCESS_KEY). NOT the SYNAPS_* prefixes (those are noise). Used for loud notices when a tool fails referencing a stripped secret. Persisted in the journal (names only, never values).

§auto_approve_confirms: bool

Confirm hook results auto-approved (server --auto-approve-confirms). Interactive hosts: false.

§model_override: Option<String>

CLI --model override applied after session resolution.

§persist: bool

Save policy: only “save at all” — the TUI/chat/rpc always save; tests may disable. Default true.

§auto_compact: bool

Headless-chat policy: after every turn, save + assess_context and auto-compact when the engine budget says so (chat.rs post-turn block). The TUI does its own compaction; default false.

§compaction_policy: CompactionPolicyWire

Compaction transition policy: InPlace (default; chat, today’s actor) or LinkedSuccessor (the TUI’s successor-session chain).

§await_extensions: bool

Block create on process-level extension discovery before emitting on_session_start (chat/daemon). The TUI passes false: the actor emits it from a spawned waiter so boot never blocks on discovery.

§keep_warm: bool

Never Park this session (--keep-warm). Default false.

§name: Option<String>

--name: name the session at create (same rules as /cmd saveas; must be unique among saved sessions). Applied before the registry entry is written so synaps send --session <name> resolves at once.

§max_session_cost: Option<f64>

(E-P7, §S3) Hard per-session spend ceiling in USD. None = unbounded. Checked after every Usage stream event; a breach cancels the turn, revokes any armed driver, and emits CostCapReached. This is the host-owned circuit breaker for an actor-resident autonomous driver.

Trait Implementations§

Source§

impl Clone for SessionConfig

Source§

fn clone(&self) -> Self

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 SessionConfig

Source§

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

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

impl Default for SessionConfig

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for SessionConfig

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 Serialize for SessionConfig

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

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> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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