Entropic 2.11.1
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
44ENTROPIC_EXPORT std::string load_config(
45 const std::filesystem::path& global_path,
46 const std::filesystem::path& project_path,
47 const BundledModels& registry,
48 ParsedConfig& config);
49
69ENTROPIC_EXPORT std::string load_layered(
70 const std::filesystem::path& project_dir,
71 const std::filesystem::path& consumer_defaults,
72 const BundledModels& registry,
73 ParsedConfig& config);
74
89ENTROPIC_EXPORT std::string load_config_from_file(
90 const std::filesystem::path& path,
91 const BundledModels& registry,
92 ParsedConfig& config);
93
109ENTROPIC_EXPORT std::string parse_config_file(
110 const std::filesystem::path& path,
111 const BundledModels& registry,
112 ParsedConfig& config);
113
124ENTROPIC_EXPORT void apply_env_overrides(ParsedConfig& config);
125
139ENTROPIC_EXPORT std::filesystem::path resolve_data_dir(const ParsedConfig& config);
140
156ENTROPIC_EXPORT std::string load_config_from_string(
157 const std::string& content,
158 const BundledModels& registry,
159 ParsedConfig& config);
160
161} // 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:857
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:1316
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:746
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:884
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:1220