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: boolConfirm hook results auto-approved (server --auto-approve-confirms).
Interactive hosts: false.
model_override: Option<String>CLI --model override applied after session resolution.
persist: boolSave policy: only “save at all” — the TUI/chat/rpc always save; tests
may disable. Default true.
auto_compact: boolHeadless-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: CompactionPolicyWireCompaction transition policy: InPlace (default; chat, today’s
actor) or LinkedSuccessor (the TUI’s successor-session chain).
await_extensions: boolBlock 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: boolNever 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
impl Clone for SessionConfig
Source§impl Debug for SessionConfig
impl Debug for SessionConfig
Source§impl Default for SessionConfig
impl Default for SessionConfig
Source§impl<'de> Deserialize<'de> for SessionConfig
impl<'de> Deserialize<'de> for SessionConfig
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>,
Auto Trait Implementations§
impl Freeze for SessionConfig
impl RefUnwindSafe for SessionConfig
impl Send for SessionConfig
impl Sync for SessionConfig
impl Unpin for SessionConfig
impl UnsafeUnpin for SessionConfig
impl UnwindSafe for SessionConfig
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.