Skip to main content

SessionConfig

Struct SessionConfig 

Source
pub struct SessionConfig {
    pub root: PathBuf,
    pub timeout_secs: Option<u64>,
    pub max_output: Option<usize>,
    pub alias: Option<String>,
    pub global_recipe_dirs: Vec<PathBuf>,
    pub worktrees_dir: Option<PathBuf>,
}
Expand description

Configuration passed to Session::new. Optional fields fall back to sensible defaults (60s timeout, 100KB output limit).

Fields§

§root: PathBuf§timeout_secs: Option<u64>§max_output: Option<usize>§alias: Option<String>

Optional human-readable alias for this session.

Used by callers (MainAI / SubAgent) to dispatch by a stable label instead of the opaque session_id. Aliases are case-sensitive and must be unique within an LdsState ledger.

§global_recipe_dirs: Vec<PathBuf>

Additional global recipe directories, in precedence order (lowest first).

The default ~/.config/lds is always consulted by build_resolve_chain regardless of this list. Entries here are pushed after the default and before the project justfile. Populate via LDS_RECIPE_GLOBAL_DIRS (colon-separated) and/or the global_recipe_dir MCP wire argument.

§worktrees_dir: Option<PathBuf>

Directory where session-owned git worktrees are placed.

Resolution precedence (highest first): this field → env LDS_WORKTREES_DIR<root>/.worktrees (default).

Setup expectation — this dir MUST be gitignored. GitModule::worktree_add creates worktrees at <worktrees_dir>/<name> on session-owned branches. If the directory is not covered by .gitignore, git status will surface the worktree contents as untracked entries in the parent repo and a git add -A / commit can silently absorb them (large accidental commit). Callers overriding this path (env or explicit field) must ensure the target is either outside the parent repo’s tracking or listed in the parent’s .gitignore. repo-readiness-check C1 treats .worktrees as a Universal must-have gitignore entry for the default path.

Absolute paths are taken verbatim. Relative paths are resolved against root.

Trait Implementations§

Source§

impl Debug for SessionConfig

Source§

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

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

impl Default for SessionConfig

Source§

fn default() -> SessionConfig

Returns the “default value” for a type. 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> 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, 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