Skip to main content

Config

Struct Config 

Source
pub struct Config {
Show 30 fields pub cwd: PathBuf, pub home: PathBuf, pub agent_dir: PathBuf, pub settings: Value, pub loki: LokiMode, pub loki_hygiene: Level, pub loki_root: Option<PathBuf>, pub runtime_path: PathBuf, pub skills_dir: PathBuf, pub mask_secrets: Option<String>, pub output_bytes: Option<String>, pub cell_yield_after: Option<String>, pub snapshot_key: Option<Vec<u8>>, pub spawn_depth: u32, pub async_events: bool, pub ts_guide: bool, pub hints: bool, pub turn_guards: bool, pub result_footer: bool, pub tool_rounds_nudge: u64, pub skill_nudge: u64, pub context_images: usize, pub frame_env: HashMap<String, String>, pub var: VarLookup, pub masker: Arc<OutputMasker>, pub project_trusted: bool, pub provider_token: ProviderToken, pub outside_changes: OutsideChanges, pub lsp: Option<LspGuard>, pub terminal_theme: Arc<Mutex<Option<String>>>,
}
Expand description

What every lane of this process shares: settings, locations, guards and the snapshot key. Owned values only, so subagent lanes can be built on their own threads.

Fields§

§cwd: PathBuf§home: PathBuf§agent_dir: PathBuf§settings: Value

The merged settings (sandbox.*, loki, …).

§loki: LokiMode§loki_hygiene: Level

Which hygiene advisories Loki adds after a write (ULTRON_LOKI_HYGIENE, else loki.hygiene, else on).

§loki_root: Option<PathBuf>

Where Loki’s policy is read: the Git work tree containing the cwd, else the cwd (None when Loki is off).

§runtime_path: PathBuf§skills_dir: PathBuf§mask_secrets: Option<String>§output_bytes: Option<String>§cell_yield_after: Option<String>

ULTRON_CELL_YIELD_AFTER: how long a woken root’s cell may hold its tool call before it continues in the background (crate::lane cell_yield_after).

§snapshot_key: Option<Vec<u8>>§spawn_depth: u32§async_events: bool

ULTRON_ASYNC_EVENTS is not off: completions of detached work continue the run.

§ts_guide: bool

ULTRON_GUIDE=ts (ts_guide).

§hints: bool

ULTRON_HINTS=on (hints).

§turn_guards: bool

Not ULTRON_TURN_GUARDS=off, outside the TypeScript guide (turn_guards).

§result_footer: bool

The global rlm.resultFooter setting, outside the TypeScript guide: REPL results end with crate::lane::result_footers, and the runtime guide says so.

§tool_rounds_nudge: u64

Rounds without a user message before the root is nudged (ULTRON_TOOL_ROUNDS_NUDGE).

§skill_nudge: u64

Turns before a skill-extraction nudge (ULTRON_SKILL_NUDGE).

§context_images: usize

Tool-result images a request keeps (ULTRON_CONTEXT_IMAGES; 0: all).

§frame_env: HashMap<String, String>

The frame settings rlm.map / rlm.infer read from the environment (ULTRON_RLM_FRAME_MODEL, ULTRON_REVIEW_MODEL, ULTRON_RLM_MAP_TOKENS).

§var: VarLookup

The process environment, for models.json keys and headers ($VAR values).

§masker: Arc<OutputMasker>

Cell output masking for every lane: the values MCP servers resolve (env, headers) are registered here, as TypeScript’s process-wide registerSecretValues.

§project_trusted: bool

Whether the project’s own configuration (.pi/mcp.json) may be read.

§provider_token: ProviderToken

The current key of a /login provider, for MCP servers with auth.provider.

§outside_changes: OutsideChanges

Files Loki’s own setup commit changed (crate::loki_notice): not the changes of the cell it ran beside.

§lsp: Option<LspGuard>

The session’s language servers, shared by every lane; None when they are off (lsp::enabled).

§terminal_theme: Arc<Mutex<Option<String>>>

The terminal appearance the attached TUI reported (crate::core::Op::SetTerminalTheme): diagram.mermaid’s auto theme follows it before the session’s COLORFGBG.

Implementations§

Source§

impl Config

Source

pub fn child_env(&self) -> Vec<(String, String)>

Source

pub fn from_env(env: &Env) -> Config

The kernel environment and output budget a lane reads.

Source

pub fn settings_reader(&self) -> Arc<dyn Fn() -> SettingsManager + Send + Sync> ⓘ

Reads the settings as they are now, with the worker’s project trust (fixed when the session opened): what the TypeScript worker reads from its live SettingsManager per frame, spawn or request.

Source

pub fn bundled_skills(&self) -> Option<String>

The bundled skills directory (packages/coding-agent/skills, beside the runtime), unless ULTRON_BUNDLED_SKILLS turns it off.

Source

pub fn mcp_gateway(&self) -> Arc<Gateway> ⓘ

The session’s MCP gateway (TypeScript’s extensions/mcp, built in): the servers of mcp.json, and of .pi/mcp.json in a trusted project, reached from the REPL through the mcp tool. Server log messages go to <agentDir>/mcp.log.

Source

pub fn model(&self, provider: &str, id: &str) -> Option<Model>

The model provider/id of the built-in catalog or models.json, ready for requests.

Source

pub fn find_models(&self) -> Value

rlm.find_models (session-worker.ts): the available models (registry.getAvailable()) as {provider, id, name}, whatever the query.

Source

pub fn race_models(&self) -> Value

rlm.race_models: rlm.raceModels (/settings -> Models) read now, keeping the refs that name a known model.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Config

§

impl !UnwindSafe for Config

§

impl Forget for Config

§

impl Freeze for Config

§

impl Move for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnsafeUnpin for Config

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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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