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: StickyBitPolicyControls 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: boolWhether 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: boolWhether 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§
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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