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. For the default path,
a top-level .worktrees entry in the parent repo’s .gitignore
is the recommended coverage.
Absolute paths are taken verbatim. Relative paths are resolved
against root.