Skip to main content

Settings

Struct Settings 

Source
pub struct Settings {
Show 16 fields pub managed_root: Option<String>, pub targets: Option<Vec<String>>, pub models_cache_ttl_hours: Option<u32>, pub min_mars_version: Option<String>, pub default_harness: Option<String>, pub default_model: Option<String>, pub default_network: Option<NetworkPolicy>, pub network_allow: PermissionSet<NetworkHost>, pub network_deny: PermissionSet<NetworkHost>, pub tools: ToolRuleMap, pub harness_order: Option<Vec<String>>, pub provider_order: Option<Vec<String>>, pub catalog_providers: Option<Vec<String>>, pub agent_emission: Option<AgentEmission>, pub meridian: MeridianSettings, pub model_policies: Option<Vec<ModelPolicyRule>>,
}
Expand description

Global settings — extensible via additional fields.

Fields§

§managed_root: Option<String>

Custom managed output directory (e.g. “.claude”).

When unset, mars no longer creates a generic .agents target by default; .mars/ is the canonical compiled store and native emission is handled by target-specific compiler paths.

§targets: Option<Vec<String>>

Managed target directories materialized from .mars/ canonical store. When set, only listed targets are populated. When unset, managed_root is used for backwards compatibility; otherwise no target-sync targets are enabled by default.

§models_cache_ttl_hours: Option<u32>

Unset means DEFAULT_MODELS_CACHE_TTL_HOURS; read it through models_cache_ttl_hours().

§min_mars_version: Option<String>

Minimum mars binary version required to use this project. Old binary + new package with this set → compatibility error. New binary + old package without this set → succeeds with defaults.

§default_harness: Option<String>

Default harness for launch routing when profile/alias/provider cannot resolve one.

§default_model: Option<String>

Project-wide default model token when no CLI override or profile model is set.

§default_network: Option<NetworkPolicy>

Project-wide network mode when no higher policy layer sets one.

§network_allow: PermissionSet<NetworkHost>§network_deny: PermissionSet<NetworkHost>§tools: ToolRuleMap

Tool rules for every agent and for a launch with no agent. Takes allow, ask and deny; never *.

§harness_order: Option<Vec<String>>

Ordered harness preference for launch-bundle candidate selection.

When set, replaces built-in provider preference ordering for candidate selection. First installed candidate wins. When unset, Mars uses the built-in default (claude, pi, codex, opencode, cursor).

§provider_order: Option<Vec<String>>

Ordered provider preference for model-first routing tie-breaks.

Optional soft preference used only after model-name matching. Empty means preserve harness-reported model order.

§catalog_providers: Option<Vec<String>>

models.dev provider keys ingested into the models cache.

Unset uses the built-in default (anthropic, openai, google, meta, deepseek, xai, openrouter). Set replaces that list. ["*"] ingests every provider. Catalog-only: a pinned alias still works if the harness can resolve the provider.

§agent_emission: Option<AgentEmission>

Controls whether harness-bound agents are emitted to native harness dirs.

auto (the default when unset) emits for standalone mars syncs and suppresses native agent artifacts when Meridian invokes mars with MERIDIAN_MANAGED=1.

§meridian: MeridianSettings§model_policies: Option<Vec<ModelPolicyRule>>

Implementations§

Source§

impl Settings

Source

pub fn models_cache_ttl_hours(&self) -> u32

Source

pub fn model_policies(&self) -> &[ModelPolicyRule]

Source

pub fn meridian_agent_copy(&self) -> Option<&AgentCopyConfig>

Selective native agent copy config from [settings.meridian.agent_copy].

Source

pub fn network_keys(&self) -> Vec<(&'static str, bool)>

The network keys a project sets in [settings] (or inherits from the user config), each with whether it restricts: default_network = "allow" is a grant.

Source

pub fn meridian_fanout_agents(&self) -> &[String]

Fanout agent list from [settings.meridian.fanout].

Trait Implementations§

Source§

impl Clone for Settings

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Settings

Source§

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

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

impl Default for Settings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Settings

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Settings

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Settings

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Settings

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.