Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
loader.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
15#pragma once
16
20#include <filesystem>
21#include <string>
22
23namespace entropic::config {
24
41ENTROPIC_EXPORT std::string load_config(
42 const std::filesystem::path& global_path,
43 const std::filesystem::path& project_path,
44 const BundledModels& registry,
45 ParsedConfig& config);
46
63ENTROPIC_EXPORT std::string load_layered(
64 const std::filesystem::path& project_dir,
65 const std::filesystem::path& consumer_defaults,
66 const BundledModels& registry,
67 ParsedConfig& config);
68
81ENTROPIC_EXPORT std::string load_config_from_file(
82 const std::filesystem::path& path,
83 const BundledModels& registry,
84 ParsedConfig& config);
85
98ENTROPIC_EXPORT std::string parse_config_file(
99 const std::filesystem::path& path,
100 const BundledModels& registry,
101 ParsedConfig& config);
102
112ENTROPIC_EXPORT void apply_env_overrides(ParsedConfig& config);
113
126ENTROPIC_EXPORT std::filesystem::path resolve_data_dir(const ParsedConfig& config);
127
141ENTROPIC_EXPORT std::string load_config_from_string(
142 const std::string& content,
143 const BundledModels& registry,
144 ParsedConfig& config);
145
146} // namespace entropic::config
Bundled model registry — resolves keys to filesystem paths.
Configuration structs with defaults.
Symbol visibility macro for all exported symbols.
ENTROPIC_EXPORT std::string load_config(const std::filesystem::path &global_path, const std::filesystem::path &project_path, const BundledModels &registry, ParsedConfig &config)
Load config using layered resolution.
Definition loader.cpp:676
ENTROPIC_EXPORT std::string load_config_from_string(const std::string &content, const BundledModels &registry, ParsedConfig &config)
Load config from a YAML/JSON string (no layering).
Definition loader.cpp:1109
ENTROPIC_EXPORT std::filesystem::path resolve_data_dir(const ParsedConfig &config)
Resolve the bundled data directory.
Definition data_dir.cpp:81
ENTROPIC_EXPORT std::string parse_config_file(const std::filesystem::path &path, const BundledModels &registry, ParsedConfig &config)
Parse a config YAML file and overlay onto existing config.
Definition loader.cpp:573
ENTROPIC_EXPORT void apply_env_overrides(ParsedConfig &config)
Apply ENTROPIC_* environment variable overrides.
ENTROPIC_EXPORT std::string load_config_from_file(const std::filesystem::path &path, const BundledModels &registry, ParsedConfig &config)
Load config from a single YAML file (no layering).
Definition loader.cpp:702
ENTROPIC_EXPORT std::string load_layered(const std::filesystem::path &project_dir, const std::filesystem::path &consumer_defaults, const BundledModels &registry, ParsedConfig &config)
Load config with consumer defaults + global + project layers.
Definition loader.cpp:1033