pub struct PawConfig {Show 15 fields
pub default_cli: Option<String>,
pub default_spec_cli: Option<String>,
pub branch_prefix: Option<String>,
pub mouse: Option<bool>,
pub clis: HashMap<String, CustomCli>,
pub presets: HashMap<String, Preset>,
pub specs: Option<SpecsConfig>,
pub logging: Option<LoggingConfig>,
pub dashboard: Option<DashboardConfig>,
pub broker: BrokerConfig,
pub supervisor: Option<SupervisorConfig>,
pub governance: GovernanceConfig,
pub layout: Option<LayoutConfig>,
pub opsx: Option<OpsxConfig>,
pub mcp: McpConfig,
}Expand description
Top-level git-paw configuration.
All fields are optional — absent config files produce empty defaults.
Fields§
§default_cli: Option<String>Default CLI to use when none is specified.
default_spec_cli: Option<String>Default CLI for --from-specs (bypasses picker when set).
branch_prefix: Option<String>Prefix for spec-derived branch names (default: "spec/").
mouse: Option<bool>Whether to enable tmux mouse mode for sessions.
clis: HashMap<String, CustomCli>Custom CLI definitions keyed by name.
presets: HashMap<String, Preset>Named presets keyed by name.
specs: Option<SpecsConfig>Spec scanning configuration.
logging: Option<LoggingConfig>Session logging configuration.
dashboard: Option<DashboardConfig>Dashboard configuration.
broker: BrokerConfigHTTP broker configuration.
supervisor: Option<SupervisorConfig>Supervisor mode configuration.
governance: GovernanceConfigGovernance document path pointers.
All sub-fields are optional. Absence is equivalent to an empty
[governance] section; v0.4 configs (no [governance] at all) load
with GovernanceConfig::default() here.
layout: Option<LayoutConfig>Layout configuration for git-paw-managed tmux sessions.
Absent [layout] (v0.5.0 and earlier configs) loads as None, which
PawConfig::border_affordances_enabled resolves to the default
(affordances on).
opsx: Option<OpsxConfig>opsx (OpenSpec) integration configuration.
Absent [opsx] (v0.5.0 and earlier configs) loads as None, which
PawConfig::role_gating_mode resolves to the default
(RoleGatingMode::Warn).
mcp: McpConfigMCP server configuration.
Absent [mcp] (v0.6.0 and earlier configs) loads as
McpConfig::default (name: None), so the MCP server advertises the
default "git-paw" identity and pre-existing configs round-trip
unchanged.
Implementations§
Source§impl PawConfig
impl PawConfig
Sourcepub fn merged_with(&self, overlay: &Self) -> Self
pub fn merged_with(&self, overlay: &Self) -> Self
Returns a new config that merges overlay on top of self.
Scalar fields from overlay take precedence when present.
Map fields are merged with overlay entries winning on key collisions.
Sourcepub fn role_gating_mode(&self) -> RoleGatingMode
pub fn role_gating_mode(&self) -> RoleGatingMode
Resolves the effective opsx role-gating mode for this config,
defaulting to RoleGatingMode::Warn when [opsx] or its
role_gating field is absent.
Sourcepub fn border_affordances_enabled(&self) -> bool
pub fn border_affordances_enabled(&self) -> bool
Resolve whether the border affordances should be applied, defaulting to
true when the [layout] section or its border_affordances field is
absent.
Sourcepub fn mcp_server_name(&self) -> String
pub fn mcp_server_name(&self) -> String
Resolves the effective MCP server identity advertised in the
initialize handshake’s serverInfo.name.
Returns the configured [mcp].name when set, otherwise the default
"git-paw".
Sourcepub fn get_preset(&self, name: &str) -> Option<&Preset>
pub fn get_preset(&self, name: &str) -> Option<&Preset>
Returns a preset by name, if it exists.
Sourcepub fn get_dashboard(&self) -> Option<&DashboardConfig>
pub fn get_dashboard(&self) -> Option<&DashboardConfig>
Returns the dashboard configuration, if it exists.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PawConfig
impl<'de> Deserialize<'de> for PawConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for PawConfig
impl StructuralPartialEq for PawConfig
Auto Trait Implementations§
impl Freeze for PawConfig
impl RefUnwindSafe for PawConfig
impl Send for PawConfig
impl Sync for PawConfig
impl Unpin for PawConfig
impl UnsafeUnpin for PawConfig
impl UnwindSafe for PawConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more