Expand description
Server config file support (~/.mse/config.toml, CLI > file > default merge).
Server config file support (~/.mse/config.toml by default).
Resolution precedence: CLI flag > config file > built-in default.
CLI flags are represented as Option<T> on the main.rs Args struct
(rather than relying on clap’s default_value) so “not passed” can be
distinguished from “matches the default value”; [resolve] performs the
actual 3-way merge.
Design rationale: the config file becomes the lifecycle SoT; the launchd
plist’s ProgramArguments stays fixed at <server-bin> --config <path>,
so changing settings = editing the file + restarting, not editing the plist.
Structs§
- CliOverrides
- CLI-side overrides. Mirrors
FileConfigfield-for-field. Kept as a separate type (rather than reusingclap::Argsdirectly) so this module stays independent of theclapderive onmain.rs::Args. - File
Config - TOML config schema. All fields are optional — a missing field falls back
to the CLI-supplied value or the built-in default at
resolvetime. Unknown fields are a hard error (deny_unknown_fields; typo guard). - Resolved
Config - Fully resolved config — every field has the built-in default applied.
Functions§
- default_
config_ path - Default config path,
~/.mse/config.toml. Falls back to a relative path literal when$HOMEis unset (best-effort; dev-only edge case). - default_
replay_ store_ path - Default
ReplayStoreSQLite path,~/.mse/store/replay.sqlite. Sibling ofdefault_run_store_path— persisted by default so a restart can consult the replay log (seemlua_swarm::store::replaymodule doc). - default_
run_ store_ path - Default
RunStoreSQLite path,~/.mse/store/run.sqlite. Sibling ofdefault_task_store_path. - default_
stale_ run_ sweep_ secs - Built-in default idle threshold for the periodic stale-run sweep,
seconds:
max(sync_timeout_secs, default_run_ttl()) + 300. - default_
store_ path - Default
BlueprintStoreroot,~/.mse/store. Same$HOMEfallback rule asdefault_config_path. The store is always git-backed; config/CLI only override where the repos live, never whether they persist. - default_
sync_ timeout_ secs - Built-in default sync-launch timeout ceiling (GH #33 Guard 2), seconds.
3600s / 60 min — sized for LLM-driven agent flows where individual
spawns routinely take 60-180s and full phases run 20-40 min. The
previous 300s ceiling under-shot the primary workload; users hitting
it were legitimate long-running runs, not stuck ones. Callers who
want faster fail-loud can override per-request
(
TaskLaunchRequest.timeout_secs) or server-wide (config or CLI). GH #39. - default_
task_ store_ path - Default
TaskStoreSQLite path,~/.mse/store/task.sqlite(issue #35 ST1 — persist-by-default). Same$HOMEfallback asdefault_config_path. - load_
file_ config - Load + parse a TOML config file. A missing file resolves to
Ok(FileConfig::default())(built-in default fallback, per module doc); any other IO error or a parse error isErr— a malformed config file must not be silently ignored (fail-loud). - resolve
- 3-way merge: CLI > file > built-in default.
bindrequires a parse step (both CLI and file carry it as a string); a parse error surfaces asErr.