pub struct AppConfig {
pub port: u16,
pub font_size: f32,
pub theme: ThemeVariant,
pub orchestrator_root: Option<PathBuf>,
pub orchestrator: AgentConfig,
pub worker: AgentConfig,
pub github_token: Option<String>,
pub brain: BrainConfig,
pub theme_file: Option<String>,
pub harnesses: BTreeMap<String, HarnessSpec>,
}Fields§
§port: u16§font_size: f32§theme: ThemeVariant§orchestrator_root: Option<PathBuf>Override for the orchestrator root directory.
Defaults to ~/.config/ninox/orchestrator.
orchestrator: AgentConfigAgent harness and model for orchestrator sessions.
worker: AgentConfigAgent harness and model for worker sessions spawned by ninox spawn.
github_token: Option<String>GitHub personal access token. If absent, falls back to GITHUB_TOKEN env var.
Requires repo scope for private repos, public_repo for public.
brain: BrainConfigKnowledge base (brain) configuration.
theme_file: Option<String>Theme file name (resolves to ~/.config/ninox/themes/<name>.toml) or
an absolute/~-relative path. None uses themes/field-notes.toml
if present, else the built-in Field Notes palettes.
harnesses: BTreeMap<String, HarnessSpec>Agent-harness registry overrides/extensions ([harnesses.<name>]).
Builtin specs for claude-code/codex/opencode/aider/freebuff apply
when a name is absent here. See crate::harness. Kept last so TOML
serialization emits this table-of-tables after every scalar field.
Implementations§
Source§impl AppConfig
impl AppConfig
Sourcepub fn registry(&self) -> HarnessRegistry
pub fn registry(&self) -> HarnessRegistry
The effective harness registry: builtin specs overlaid by this
config’s [harnesses.*] entries.
Sourcepub fn resolved_brain_path(&self) -> PathBuf
pub fn resolved_brain_path(&self) -> PathBuf
Path to the knowledge-base (brain) directory.
Honors the NINOX_BRAIN environment variable as an override: if
set, it is treated as an absolute path to the brain directory and
returned as-is, mirroring how config_path() honors NINOX_CONFIG.
This lets a selected catalogue (see catalogue_options()) be handed
to a spawned orchestrator session via its environment without
mutating config.toml, and lets tests redirect brain reads/writes
without touching the real user brain directory.
Falls back to self.brain.path when set, else <config_dir>/ninox/brain.
Sourcepub fn catalogue_options(&self) -> Vec<CatalogueRef>
pub fn catalogue_options(&self) -> Vec<CatalogueRef>
All selectable knowledge-base catalogues: the implicit “default”
(this config’s resolved_brain_path()) followed by any additional
catalogues configured under [[brain.catalogues]] — skipping any
entry literally named “default” to avoid a confusing duplicate.
pub fn resolved_orchestrator_root(&self) -> PathBuf
Sourcepub fn config_path() -> PathBuf
pub fn config_path() -> PathBuf
Path to the config.toml file.
Honors the NINOX_CONFIG environment variable as an override: if
set, it is treated as an absolute path to the config file itself
(not a directory) and returned as-is. This is the same override
consumed by spawned agent sessions (see the NINOX_CONFIG env var
set alongside NINOX_BIN when launching orchestrator sessions), and
it also lets tests redirect config reads/writes away from the real
user config file (e.g. ~/Library/Application Support/ninox/config.toml
on macOS) without mutating developer machine state.
Falls back to <config_dir>/ninox/config.toml when unset.
Sourcepub fn ninox_bin_dir() -> PathBuf
pub fn ninox_bin_dir() -> PathBuf
Directory for Ninox-managed shell wrappers prepended to agent PATH.
Default: ~/.config/ninox/bin/
Sourcepub fn sessions_dir() -> PathBuf
pub fn sessions_dir() -> PathBuf
Directory where per-session metadata JSON files are written by wrapper hooks.
Default: ~/.config/ninox/sessions/
pub fn load() -> Result<Self>
pub fn save(&self) -> Result<()>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppConfig
impl<'de> Deserialize<'de> for AppConfig
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>,
Auto Trait Implementations§
impl Freeze for AppConfig
impl RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl UnsafeUnpin for AppConfig
impl UnwindSafe for AppConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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