Skip to main content

SessionConfig

Struct SessionConfig 

Source
pub struct SessionConfig {
Show 13 fields pub session_id: String, pub job_parameter_values: JobParameterValues, pub path_mapping_rules: Option<Vec<PathMappingRule>>, pub retain_working_dir: bool, pub callback: Option<SessionCallbackType>, pub os_env_vars: Option<HashMap<String, String>>, pub session_root_directory: Option<PathBuf>, pub user: Option<Arc<dyn SessionUser>>, pub profile: Option<ModelProfile>, pub cancel_token: Option<CancellationToken>, pub sticky_bit_policy: StickyBitPolicy, pub debug_collect_stdout: bool, pub echo_openjd_directives: bool,
}
Expand description

Configuration for creating a new Session.

Fields§

§session_id: String§job_parameter_values: JobParameterValues§path_mapping_rules: Option<Vec<PathMappingRule>>§retain_working_dir: bool§callback: Option<SessionCallbackType>§os_env_vars: Option<HashMap<String, String>>§session_root_directory: Option<PathBuf>§user: Option<Arc<dyn SessionUser>>§profile: Option<ModelProfile>

Revision + extensions profile that drives expression-function availability and redaction behaviour. Sessions do not use caller-policy limits, so a ModelProfile is the right shape here — not a full ValidationContext.

§cancel_token: Option<CancellationToken>

Optional external cancellation token. When cancelled, all running and future actions will be cancelled via the spec’s cancellation sequence.

§sticky_bit_policy: StickyBitPolicy

Controls behavior when a parent directory of the session root is world-writable without the sticky bit set (POSIX only). Defaults to Strict (fail-closed). Has no effect on Windows.

§debug_collect_stdout: bool

Whether to accumulate subprocess stdout into result strings. Intended for debugging only — production callers should leave this false and observe output through the real-time callback instead. Default is false — output is still streamed through the callback in real time, but ActionResult.stdout and similar fields stay empty.

§echo_openjd_directives: bool

Whether to echo openjd_* directive lines (e.g. openjd_progress, openjd_status, openjd_env, openjd_redacted_env, …) from subprocess stdout to the session log.

Default is true, matching the Python openjd-sessions reference implementation. When false, recognised directives are still parsed and acted on (progress, status, env-var changes, redacted-value registration, …) but the directive lines themselves are filtered out of the log stream.

Redaction interaction: regardless of this flag, values from openjd_redacted_env directives are added to the session’s redaction set before the originating line would be passed through, so when echo_openjd_directives = true the directive line that introduces a secret is still redacted (NAME=********) before reaching the log. Subsequent occurrences of the secret in any log line are also redacted. Setting this flag to false does not improve security — it just removes the directive lines from operator-facing output.

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. 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.