pub struct OrcsConfig {
pub debug: bool,
pub model: ModelConfig,
pub hil: HilConfig,
pub paths: PathsConfig,
pub ui: UiConfig,
pub scripts: ScriptsConfig,
pub components: ComponentsConfig,
pub hooks: HooksConfig,
pub mcp: McpConfig,
pub timeouts: TimeoutsConfig,
}Expand description
Main configuration structure.
This is the unified configuration after merging all layers.
§Serialization
Serializes to TOML for file storage. Fields with #[serde(default)]
are optional in the config file.
§Example
use orcs_runtime::config::OrcsConfig;
let config = OrcsConfig::default();
assert!(!config.debug);Fields§
§debug: boolEnable debug mode (verbose logging, diagnostics).
model: ModelConfigModel configuration.
hil: HilConfigHuman-in-the-loop configuration.
paths: PathsConfigPath configuration.
ui: UiConfigUI configuration.
scripts: ScriptsConfigScript configuration.
components: ComponentsConfigComponent loading configuration.
hooks: HooksConfigHooks configuration.
mcp: McpConfigMCP (Model Context Protocol) server configuration.
timeouts: TimeoutsConfigTimeout configuration.
Implementations§
Source§impl OrcsConfig
impl OrcsConfig
Sourcepub fn global_config_for_lua(&self) -> Value
pub fn global_config_for_lua(&self) -> Value
Returns global config fields as a JSON value for Lua component injection.
This is injected into each component’s init(cfg) table under the _global key
by OrcsAppBuilder::build(), so Lua components can access it as cfg._global.
§Included fields
| Key | Type | Description |
|---|---|---|
debug | bool | Debug mode flag |
model.default | string | Default model name |
model.temperature | number | Default sampling temperature |
model.max_tokens | number|null | Default max completion tokens |
hil.auto_approve | bool | Auto-approve requests |
hil.timeout_ms | number | Approval timeout (ms) |
ui.verbose | bool | Verbose output |
ui.color | bool | Color output |
ui.emoji | bool | Emoji output |
timeouts.delegate_ms | number | Delegate task timeout (ms) |
§Excluded fields
paths, scripts, components, hooks are excluded (internal/sensitive).
Trait Implementations§
Source§impl Clone for OrcsConfig
impl Clone for OrcsConfig
Source§fn clone(&self) -> OrcsConfig
fn clone(&self) -> OrcsConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more