pub struct SubcogConfig {Show 17 fields
pub repo_path: PathBuf,
pub data_dir: PathBuf,
pub features: FeatureFlags,
pub max_results: usize,
pub default_search_mode: SearchMode,
pub llm: LlmConfig,
pub search_intent: SearchIntentConfig,
pub observability: ObservabilitySettings,
pub prompt: PromptConfig,
pub storage: StorageConfig,
pub consolidation: ConsolidationConfig,
pub ttl: TtlConfig,
pub timeouts: OperationTimeoutConfig,
pub context_templates: ContextTemplatesConfig,
pub org: OrgConfig,
pub webhooks: WebhooksConfig,
pub config_sources: Vec<PathBuf>,
}Expand description
Main configuration for subcog.
Fields§
§repo_path: PathBufPath to the git repository.
data_dir: PathBufPath to the data directory.
features: FeatureFlagsFeature flags.
max_results: usizeMaximum number of search results.
default_search_mode: SearchModeDefault search mode.
llm: LlmConfigLLM provider configuration.
search_intent: SearchIntentConfigSearch intent configuration.
observability: ObservabilitySettingsObservability settings.
prompt: PromptConfigPrompt customization settings.
storage: StorageConfigStorage configuration.
consolidation: ConsolidationConfigConsolidation configuration.
ttl: TtlConfigTTL (Time-To-Live) configuration for memory expiration.
timeouts: OperationTimeoutConfigOperation timeout configuration (CHAOS-HIGH-005).
context_templates: ContextTemplatesConfigContext template configuration.
org: OrgConfigOrganization configuration for shared memory graphs.
webhooks: WebhooksConfigWebhook configuration.
config_sources: Vec<PathBuf>Config files that were loaded (for debugging).
Implementations§
Source§impl SubcogConfig
impl SubcogConfig
Sourcepub fn load_from_file(path: &Path) -> Result<Self>
pub fn load_from_file(path: &Path) -> Result<Self>
Loads configuration from a file path.
§Errors
Returns an error if the file cannot be read or parsed.
Sourcepub fn load_default() -> Self
pub fn load_default() -> Self
Loads configuration from the default location.
Config location: ~/.config/subcog/config.toml
Data location (platform-specific):
- macOS:
~/Library/Application Support/subcog/ - Linux:
~/.local/share/subcog/ - Windows:
C:\Users\<User>\AppData\Local\subcog\
Returns default configuration if no config file is found.
fn apply_env_overrides(&mut self)
Sourcefn apply_config_file(&mut self, file: ConfigFile)
fn apply_config_file(&mut self, file: ConfigFile)
Applies a ConfigFile to the current configuration.
ARCH-HIGH-002: Delegates to sub-config merge_from/from_config_file methods.
Sourcepub fn with_repo_path(self, path: impl Into<PathBuf>) -> Self
pub fn with_repo_path(self, path: impl Into<PathBuf>) -> Self
Sets the repository path.
Sourcepub fn with_data_dir(self, path: impl Into<PathBuf>) -> Self
pub fn with_data_dir(self, path: impl Into<PathBuf>) -> Self
Sets the data directory.
Trait Implementations§
Source§impl Clone for SubcogConfig
impl Clone for SubcogConfig
Source§fn clone(&self) -> SubcogConfig
fn clone(&self) -> SubcogConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SubcogConfig
impl Debug for SubcogConfig
Source§impl Default for SubcogConfig
impl Default for SubcogConfig
Source§impl From<SubcogConfig> for Config
impl From<SubcogConfig> for Config
Source§fn from(subcog: SubcogConfig) -> Self
fn from(subcog: SubcogConfig) -> Self
Auto Trait Implementations§
impl Freeze for SubcogConfig
impl RefUnwindSafe for SubcogConfig
impl Send for SubcogConfig
impl Sync for SubcogConfig
impl Unpin for SubcogConfig
impl UnwindSafe for SubcogConfig
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> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].