Entropic 2.11.1
Local-first agentic inference engine
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
16#pragma once
17
19
20#include <cstdint>
21#include <string>
22#include <vector>
23#include <optional>
24#include <filesystem>
25#include <unordered_map>
26
27namespace entropic {
28
38enum class MCPAccessLevel : uint8_t {
39 NONE = 0,
40 READ = 1,
41 WRITE = 2,
42};
43
48struct MCPKey {
49 std::string tool_pattern;
51};
52
60const char* mcp_access_level_name(MCPAccessLevel level);
61
70bool parse_mcp_access_level(const std::string& name, MCPAccessLevel& out);
71
81 std::string key;
82 std::string gbnf_content;
83 std::string source;
84 bool validated = false;
85 std::string error;
86};
87
101
112enum class AdapterState : int {
113 COLD = 0,
114 WARM = 1,
115 HOT = 2
116};
117
127 std::string name;
128 std::filesystem::path path;
130 float scale = 1.0f;
131 std::string tier_name;
132 std::string base_model_path;
133 size_t ram_bytes = 0;
134
136 std::unordered_map<std::string, std::string> metadata;
137};
138
155 std::filesystem::path path;
156 std::string adapter = "qwen35";
157 int context_length = 16384;
158 int gpu_layers = -1;
159 bool keep_warm = false;
160 bool use_mlock = true;
161
162 /* ── llama.cpp pass-through ────────────────────────── */
164 std::string cache_type_k = "f16";
165 std::string cache_type_v = "f16";
166 int n_batch = 512;
167
178 int n_ubatch = 0;
179
180 int n_threads = 0;
181 std::string tensor_split;
182
192 std::string split_mode;
193
200 int main_gpu = 0;
201
208 bool offload_kqv = true;
209
218 float rope_freq_base = 0.0f;
219
228 float rope_freq_scale = 0.0f;
229
238 int n_parallel = 1;
239 bool flash_attn = true;
240
241 /* ── Tool filtering ────────────────────────────────── */
242 std::optional<std::vector<std::string>> allowed_tools;
243
244 /* ── Vision / multimodal (v1.9.11) ────────────────── */
245
250 std::filesystem::path mmproj_path;
251
252 /* ── Model format (v1.9.13) ───────────────────────── */
253
260 std::string model_format = "gguf";
261};
262
273 size_t max_bytes = 536870912;
274 bool enabled = true;
275 bool log_hits = true;
280 bool warm_keep = true;
281};
282
297 std::string name;
298 int n_batch = 512;
299 int n_threads = 0;
301 std::string description;
302};
303
314 float temperature = 0.7f;
315 float top_p = 0.9f;
316 int top_k = 40;
317 float repeat_penalty = 1.1f;
318
326 float min_p = 0.0f;
327
333 float presence_penalty = 0.0f;
334
347 std::unordered_map<int32_t, float> logit_bias;
348
360 float frequency_penalty = 0.0f;
361
362 int max_tokens = 4096;
363
367 int seed = -1;
369 bool enable_thinking = true;
370 std::string grammar;
375 std::string grammar_key;
376 std::vector<std::string> stop;
383 std::string tool_call_mode;
384 int logprobs = 0;
385
386 /* ── v1.9.7: Time cap + profile fields ────────────── */
387
392
397 std::string profile;
398
404 bool auto_adapt = true;
405
409 float adapt_headroom = 0.9f;
410
422 std::string tools;
423};
424
443 std::optional<std::filesystem::path> identity;
444 bool identity_disabled = false;
445 std::optional<std::filesystem::path> grammar;
446 std::optional<std::string> auto_chain;
447 std::optional<bool> routable;
448
452 std::optional<std::filesystem::path> adapter_path;
453
456 float adapter_scale = 1.0f;
457
472 std::vector<std::string> capabilities;
473
479 std::optional<float> temperature;
480
484 std::optional<int> max_output_tokens;
485
491 std::optional<float> top_p;
492 std::optional<int> top_k;
493 std::optional<float> min_p;
494 std::optional<float> presence_penalty;
495 std::optional<float> frequency_penalty;
496
502 std::optional<float> repeat_penalty;
503 std::optional<bool> enable_thinking;
510 std::optional<std::string> tool_call_mode;
511
519 std::optional<bool> speculative_mtp;
520
532 std::optional<bool> require_tool_call;
533
541 bool has_capability(const std::string& name) const {
542 for (const auto& c : capabilities) {
543 if (c == name) { return true; }
544 }
545 return false;
546 }
547
560 std::string get_param(const std::string& param_name) const {
561 if (param_name == "explicit_completion") {
562 return auto_chain.has_value() ? "false" : "true";
563 }
564 return "";
565 }
566};
567
573 std::unordered_map<std::string, TierConfig> tiers;
574 std::optional<ModelConfig> router;
575 std::string default_tier = "lead";
576
588 std::string find_tier_by_path(
589 const std::filesystem::path& model_path) const {
590 for (const auto& [name, tier] : tiers) {
591 if (tier.path == model_path) { return name; }
592 }
593 return "";
594 }
595};
596
608 bool enabled = false;
609 std::string fallback_tier = "lead";
610 std::optional<std::string> classification_prompt;
611 std::unordered_map<std::string, std::string> tier_map;
612 std::unordered_map<std::string, std::vector<std::string>> handoff_rules;
613};
614
620 std::vector<std::string> allow;
621 std::vector<std::string> deny;
622 bool auto_approve = false;
623};
624
631 bool fail_on_errors = true;
632 float diagnostics_timeout = 1.0f;
633 bool allow_outside_root = false;
634 std::optional<int> max_read_bytes;
635 float max_read_context_pct = 0.25f;
636};
637
643 bool enabled = false;
644 std::optional<std::filesystem::path> socket_path;
645 int rate_limit = 10;
649 bool ask_streaming = true;
650};
651
657 uint32_t base_delay_ms = 1000;
658 uint32_t max_delay_ms = 60000;
659 uint32_t max_retries = 5;
660 double backoff_factor = 2.0;
661};
662
668 std::string command;
669 std::vector<std::string> args;
670 std::unordered_map<std::string, std::string> env;
671 std::string url;
672};
673
678struct MCPConfig {
679 bool enable_entropic = true;
680 bool enable_filesystem = true;
681 bool enable_bash = true;
682 bool enable_git = true;
683 bool enable_diagnostics = true;
684 bool enable_web = true;
688 std::string working_dir;
689
699 std::vector<std::filesystem::path> plugins;
700
701 /* ── v1.8.7: External MCP client settings ──────────── */
702 std::unordered_map<std::string, ExternalServerEntry> external_servers;
705 uint32_t tool_call_timeout_ms = 30000;
706};
707
718 std::filesystem::path log_dir;
719 std::string session_id;
720 bool enabled = true;
722 size_t max_file_size = 0;
723 size_t max_files = 5;
724};
725
731 bool enabled = true;
732 std::filesystem::path db_path;
733 size_t log_max_file_size = 10 * 1024 * 1024;
734 size_t log_max_files = 3;
736};
737
743 bool enabled = true;
744 float threshold_percent = 0.75f;
747 bool notify_user = true;
748 bool save_full_history = true;
751};
752
758 int max_tokens = 4096;
759 float default_temperature = 0.7f;
760 float default_top_p = 0.9f;
761
768 std::string budget_mode = "off";
769
776
785 bool stream_output = true;
786};
787
793 std::string command;
794 std::vector<std::string> args;
795 std::vector<std::string> extensions;
796};
797
802struct LSPConfig {
803 bool enabled = true;
804 bool python_enabled = true;
805 bool c_enabled = true;
806 std::unordered_map<std::string, LSPServerConfig> servers;
807};
808
825 bool enabled = false;
828 float temperature = 0.0f;
829 bool enable_thinking = false;
830 int priority = 100;
831 std::string grammar_key = "constitutional_critique";
833 std::vector<std::string> skip_tiers = {"lead"};
838 std::string critique_tier;
839};
840
880 ModelConfig cfg;
881 cfg.gpu_layers = 0;
882 cfg.flash_attn = false;
883 cfg.context_length = 8192;
884 cfg.n_threads = 4;
885 return cfg;
886}
887
933 bool enabled = false;
934 int n_draft = 4;
940 bool mtp = false;
946
962};
963
976
995 std::string log_level = "INFO";
996
998 std::optional<std::filesystem::path> constitution;
1000
1002 std::optional<std::filesystem::path> app_context;
1013 std::optional<std::string> app_context_content;
1014
1017
1019 std::filesystem::path config_dir;
1020
1023 std::filesystem::path log_dir;
1024
1027 bool ggml_logging = false;
1028
1037 std::filesystem::path llama_log_path;
1038
1044 bool console_logging = true;
1045
1048
1052};
1053
1064 float temperature = 0.7f;
1066 bool enable_thinking = false;
1067 float repeat_penalty = 1.1f;
1068 std::optional<std::vector<std::string>> bash_commands;
1069};
1070
1071} // namespace entropic
Shared enumerations used across .so boundaries.
@ ENTROPIC_MODEL_STATE_WARM
mmap'd + mlock'd in RAM, slow inference
Definition enums.h:31
@ ENTROPIC_MODEL_STATE_COLD
On disk only, no RAM consumed.
Definition enums.h:30
@ ENTROPIC_MODEL_STATE_ACTIVE
GPU layers loaded, full inference speed.
Definition enums.h:32
Activate model on GPU (WARM → ACTIVE).
ModelState
C++ enum class for model VRAM lifecycle states.
Definition config.h:96
@ WARM
mmap'd + mlock'd in RAM
@ ACTIVE
GPU layers loaded, full speed.
@ COLD
On disk only, no RAM consumed.
const char * mcp_access_level_name(MCPAccessLevel level)
Convert MCPAccessLevel to string representation.
Definition config.cpp:21
ModelConfig make_default_draft_model_config()
Speculative decoding configuration (v2.1.11, gh#36).
Definition config.h:879
MCPAccessLevel
MCP tool access level for per-identity authorization.
Definition config.h:38
@ READ
Read-only operations (e.g., read_file, list_directory)
@ NONE
No access (default for ungranted keys)
@ WRITE
Read + write operations (e.g., write_file, execute)
AdapterState
LoRA adapter lifecycle state.
Definition config.h:112
@ COLD
Not loaded. No resources consumed.
@ HOT
Active on context via llama_set_adapter_lora(). Influencing generation.
bool parse_mcp_access_level(const std::string &name, MCPAccessLevel &out)
Parse MCPAccessLevel from string.
Definition config.cpp:35
Metadata for a loaded LoRA adapter.
Definition config.h:126
std::string tier_name
Tier this adapter is assigned to (empty = unassigned)
Definition config.h:131
size_t ram_bytes
RAM consumption when WARM/HOT (0 if COLD)
Definition config.h:133
std::string base_model_path
Path of the base model this adapter targets.
Definition config.h:132
std::filesystem::path path
Resolved path to .gguf adapter file.
Definition config.h:128
AdapterState state
Current lifecycle state.
Definition config.h:129
std::string name
Unique adapter identifier.
Definition config.h:127
std::unordered_map< std::string, std::string > metadata
Adapter-specific metadata for routing decisions.
Definition config.h:136
float scale
LoRA scaling factor (alpha/rank)
Definition config.h:130
Audit log configuration within StorageConfig.
Definition config.h:717
size_t max_file_size
Rotation size in bytes (0 = unlimited)
Definition config.h:722
size_t flush_interval_entries
Flush every N entries (0 = every entry)
Definition config.h:721
std::string session_id
UUID for this session.
Definition config.h:719
std::filesystem::path log_dir
Directory for audit log files.
Definition config.h:718
bool enabled
Master toggle for audit logging.
Definition config.h:720
size_t max_files
Max rotated files to keep.
Definition config.h:723
Auto-compaction configuration.
Definition config.h:742
bool save_full_history
Save full history before compaction.
Definition config.h:748
bool notify_user
Notify user on compaction.
Definition config.h:747
float warning_threshold_percent
Warning trigger (0.3–0.9)
Definition config.h:750
int preserve_recent_turns
Turns to preserve (1–10)
Definition config.h:745
int summary_max_tokens
Summary max tokens (500–4000)
Definition config.h:746
int tool_result_ttl
Tool result TTL in turns (>= 1; v2.1.3 #6: gated on fill, no upper bound)
Definition config.h:749
float threshold_percent
Compaction trigger (0.5–0.99)
Definition config.h:744
bool enabled
Enable auto-compaction.
Definition config.h:743
Constitutional validation pipeline configuration.
Definition config.h:824
int max_revisions
Max re-generation attempts (0 = critique only)
Definition config.h:826
int priority
Hook priority (higher = later)
Definition config.h:830
bool enable_thinking
Enable think-blocks for critique (default OFF)
Definition config.h:829
float temperature
Critique generation temperature.
Definition config.h:828
bool enabled
Global enable/disable (default OFF)
Definition config.h:825
std::string critique_tier
Tier to route critique generation on.
Definition config.h:838
int max_critique_tokens
Token budget for critique generation.
Definition config.h:827
std::string grammar_key
Grammar registry key.
Definition config.h:831
std::vector< std::string > skip_tiers
Tiers exempt from validation (default: lead — streams before hook fires)
Definition config.h:833
External MCP server configuration (Entropic-as-server).
Definition config.h:642
bool ask_streaming
Route entropic.ask through entropic_run (false) or entropic_run_streaming (true, default).
Definition config.h:649
std::optional< std::filesystem::path > socket_path
Socket path (nullopt = derived)
Definition config.h:644
int rate_limit
Requests per minute (1–100)
Definition config.h:645
bool enabled
Enable external MCP.
Definition config.h:643
Configuration for a single external MCP server entry.
Definition config.h:667
std::string command
Stdio command (empty for SSE)
Definition config.h:668
std::vector< std::string > args
Stdio command arguments.
Definition config.h:669
std::string url
SSE endpoint URL (empty for stdio)
Definition config.h:671
std::unordered_map< std::string, std::string > env
Stdio environment variables.
Definition config.h:670
Filesystem MCP server configuration.
Definition config.h:629
bool diagnostics_on_edit
Proactive diagnostics on edit/write.
Definition config.h:630
bool allow_outside_root
Allow file ops outside workspace root.
Definition config.h:633
float diagnostics_timeout
Diagnostics timeout (0.1–5.0)
Definition config.h:632
std::optional< int > max_read_bytes
Max file read size (nullopt = derive from context)
Definition config.h:634
float max_read_context_pct
Max context % for single file read.
Definition config.h:635
bool fail_on_errors
Rollback edit if it introduces errors.
Definition config.h:631
Named GPU resource profile for controlling inference hardware knobs.
Definition config.h:296
int n_threads_batch
CPU threads for batch processing (0 = use n_threads)
Definition config.h:300
int n_batch
Batch size for prompt processing (1-2048)
Definition config.h:298
std::string name
Profile name ("maximum", "balanced", "background", "minimal")
Definition config.h:297
int n_threads
CPU threads for generation (0 = auto-detect)
Definition config.h:299
std::string description
Human-readable description.
Definition config.h:301
Generation parameters configuration (top-level defaults).
Definition config.h:757
int max_tokens
Default max tokens (64–32768)
Definition config.h:758
float default_top_p
Default top_p (0.0–1.0)
Definition config.h:760
int budget_limit
gh#80 (v2.5.0) budget ceiling: generated tokens (budget_mode "tokens") or wall-clock seconds (budget_...
Definition config.h:775
std::string budget_mode
gh#80 (v2.5.0) thinking-budget mode: "off" (default), "tokens", or "wall_clock".
Definition config.h:768
float default_temperature
Default temperature (0.0–2.0)
Definition config.h:759
bool stream_output
gh#110 (v2.9.6) agent-loop token delivery mode: true streams tokens via the per-token callback path,...
Definition config.h:785
Generation parameters for a single inference call.
Definition config.h:313
int time_limit_ms
Wall-clock time cap in milliseconds.
Definition config.h:391
int reasoning_budget
Per-call think budget override (-1 = unlimited)
Definition config.h:368
std::string grammar
GBNF grammar string (empty = unconstrained)
Definition config.h:370
std::string profile
GPU resource profile name.
Definition config.h:397
std::string tool_call_mode
Per-call tool-call generation mode (gh#103).
Definition config.h:383
int top_k
Top-K sampling.
Definition config.h:316
bool auto_adapt
Enable throughput-based max_tokens auto-adaptation.
Definition config.h:404
std::unordered_map< int32_t, float > logit_bias
Per-token logit bias map (gh#23 MVP item 4).
Definition config.h:347
float repeat_penalty
Repetition penalty.
Definition config.h:317
std::string tools
Active tool definitions for this turn, as an MCP tool-list JSON array ([{name, description,...
Definition config.h:422
float temperature
Sampling temperature.
Definition config.h:314
std::string grammar_key
Grammar registry key.
Definition config.h:375
float frequency_penalty
Frequency-penalty term in llama.cpp's penalties sampler (gh#23 MVP item 3).
Definition config.h:360
float presence_penalty
Presence-penalty term in llama.cpp's penalties sampler (gh#23 MVP item 2).
Definition config.h:333
bool enable_thinking
Enable <think> blocks (false if reasoning_budget == 0)
Definition config.h:369
int logprobs
Top log-probs per token (0 = disabled)
Definition config.h:384
float adapt_headroom
Target time usage fraction for auto-adaptation.
Definition config.h:409
float min_p
Min-p nucleus sampling threshold (gh#23 MVP item 1).
Definition config.h:326
int max_tokens
Maximum tokens to generate.
Definition config.h:362
float top_p
Nucleus sampling threshold.
Definition config.h:315
int seed
RNG seed for reproducible sampling.
Definition config.h:367
std::vector< std::string > stop
Stop sequences.
Definition config.h:376
Metadata for a registered grammar.
Definition config.h:80
std::string source
Origin: "bundled", "file", "runtime", "dynamic".
Definition config.h:83
std::string key
Unique registry key (e.g., "compactor", "chess_executor")
Definition config.h:81
bool validated
true if grammar has passed validation
Definition config.h:84
std::string error
Non-empty if validation failed.
Definition config.h:85
std::string gbnf_content
Raw GBNF grammar string.
Definition config.h:82
Inference-side configuration knobs (v2.1.11).
Definition config.h:973
SpeculativeConfig speculative
Speculative decoding (gh#36)
Definition config.h:974
LSP integration configuration.
Definition config.h:802
bool python_enabled
Enable Python LSP.
Definition config.h:804
bool enabled
Enable LSP integration.
Definition config.h:803
bool c_enabled
Enable C/C++ LSP.
Definition config.h:805
std::unordered_map< std::string, LSPServerConfig > servers
Custom server overrides.
Definition config.h:806
Configuration for a single LSP server.
Definition config.h:792
std::string command
Server command.
Definition config.h:793
std::vector< std::string > args
Command arguments.
Definition config.h:794
std::vector< std::string > extensions
File extensions.
Definition config.h:795
MCP server configuration.
Definition config.h:678
ReconnectConfig reconnect
Reconnection backoff policy.
Definition config.h:703
bool enable_entropic
Enable entropic internal server (handoff, delegate, pipeline)
Definition config.h:679
std::vector< std::filesystem::path > plugins
In-process MCP server plugin .so paths (gh#133, v2.10.1).
Definition config.h:699
FilesystemConfig filesystem
Filesystem server config.
Definition config.h:685
bool enable_filesystem
Enable filesystem server.
Definition config.h:680
std::unordered_map< std::string, ExternalServerEntry > external_servers
Named external servers.
Definition config.h:702
bool enable_git
Enable git server.
Definition config.h:682
bool enable_diagnostics
Enable diagnostics server.
Definition config.h:683
int server_timeout_seconds
Server timeout (5–300)
Definition config.h:687
uint32_t health_check_interval_ms
Ping interval (0 = disabled)
Definition config.h:704
uint32_t tool_call_timeout_ms
Per-call timeout for external tools.
Definition config.h:705
bool enable_bash
Enable bash server.
Definition config.h:681
ExternalMCPConfig external
External MCP server config (Entropic-as-server)
Definition config.h:686
std::string working_dir
Server working directory (empty = CWD) (v2.0.4)
Definition config.h:688
bool enable_web
Enable web server.
Definition config.h:684
A single authorized MCP key with access level.
Definition config.h:48
MCPAccessLevel level
Granted access level (READ or WRITE)
Definition config.h:50
std::string tool_pattern
Tool pattern (e.g., "filesystem.*", "git.status")
Definition config.h:49
Model configuration for a single tier.
Definition config.h:154
std::filesystem::path mmproj_path
Vision projector GGUF path.
Definition config.h:250
int gpu_layers
GPU offload layers (-1 = all)
Definition config.h:158
int reasoning_budget
Think token budget (-1 = unlimited)
Definition config.h:163
int n_ubatch
Physical micro-batch size for prompt processing (gh#23 MVP item 5).
Definition config.h:178
int context_length
Context window size (512–131072)
Definition config.h:157
std::filesystem::path path
Resolved model file path.
Definition config.h:155
std::string model_format
Expected model format.
Definition config.h:260
float rope_freq_scale
RoPE frequency scaling factor (gh#23 MVP item 10).
Definition config.h:228
int main_gpu
Primary GPU index for model load (gh#23 MVP item 7).
Definition config.h:200
int n_threads
CPU threads (0 = auto-detect)
Definition config.h:180
bool offload_kqv
Offload KQV ops (incl.
Definition config.h:208
int n_parallel
Max parallel sequences per context (gh#23 MVP item 11).
Definition config.h:238
std::string tensor_split
Multi-GPU tensor split ratios (empty = single GPU)
Definition config.h:181
std::string cache_type_k
KV cache key quantization type.
Definition config.h:164
bool keep_warm
Pre-warm model at startup.
Definition config.h:159
std::string cache_type_v
KV cache value quantization type.
Definition config.h:165
std::string split_mode
Multi-GPU split mode for model load (gh#23 MVP item 6).
Definition config.h:192
int n_batch
Batch size for prompt processing.
Definition config.h:166
bool flash_attn
Enable flash attention.
Definition config.h:239
bool use_mlock
Lock model in system RAM.
Definition config.h:160
std::optional< std::vector< std::string > > allowed_tools
Tool whitelist (nullopt = all)
Definition config.h:242
std::string adapter
Chat adapter name.
Definition config.h:156
float rope_freq_base
RoPE base frequency override (gh#23 MVP item 9).
Definition config.h:218
Configuration for all models (tiers + router).
Definition config.h:572
std::optional< ModelConfig > router
Router model (separate from tiers)
Definition config.h:574
std::unordered_map< std::string, TierConfig > tiers
Tier name → config.
Definition config.h:573
std::string find_tier_by_path(const std::filesystem::path &model_path) const
Find tier name by model path.
Definition config.h:588
std::string default_tier
Default tier name.
Definition config.h:575
Full parsed configuration.
Definition config.h:985
int vram_reserve_mb
Reserved VRAM headroom (MB, 0–65536)
Definition config.h:1016
StorageConfig storage
Storage backend settings (v1.8.8)
Definition config.h:994
PermissionsConfig permissions
Tool permissions.
Definition config.h:989
PromptCacheConfig prompt_cache
Prompt KV cache settings.
Definition config.h:993
std::optional< std::filesystem::path > app_context
App context: nullopt = disabled by default.
Definition config.h:1002
std::optional< std::string > app_context_content
Inline app_context text, supplied instead of a path (gh#141).
Definition config.h:1013
CompactionConfig compaction
Auto-compaction settings.
Definition config.h:991
RoutingConfig routing
Routing rules.
Definition config.h:987
InferenceConfig inference
Inference-side knobs (currently speculative decoding only).
Definition config.h:1051
ModelsConfig models
Tiers + router.
Definition config.h:986
LSPConfig lsp
LSP integration.
Definition config.h:992
ConstitutionalValidationConfig constitutional_validation
Constitutional validation pipeline settings.
Definition config.h:1047
std::filesystem::path log_dir
Session log directory (session.log + session_model.log).
Definition config.h:1023
bool ggml_logging
Enable ggml/llama.cpp logging to llama_ggml.log in log_dir.
Definition config.h:1027
GenerationConfig generation
Default generation params.
Definition config.h:988
std::string log_level
Log level string.
Definition config.h:995
MCPConfig mcp
MCP server settings.
Definition config.h:990
bool console_logging
Emit engine spdlog output to the stderr console sink.
Definition config.h:1044
bool inject_model_context
Auto-inject model context into system prompt.
Definition config.h:1015
std::filesystem::path llama_log_path
Override path for ggml/llama log when ggml_logging == true (gh#23 MVP item 12, v2....
Definition config.h:1037
bool app_context_disabled
true if app_context explicitly disabled
Definition config.h:1003
std::optional< std::filesystem::path > constitution
Constitution: nullopt = bundled default, disabled = explicit false.
Definition config.h:998
bool constitution_disabled
true if constitution explicitly disabled
Definition config.h:999
std::filesystem::path config_dir
Config dir — base for bundled data discovery.
Definition config.h:1019
Tool permission configuration.
Definition config.h:619
std::vector< std::string > deny
Denied tool patterns (glob)
Definition config.h:621
std::vector< std::string > allow
Allowed tool patterns (glob)
Definition config.h:620
bool auto_approve
Skip confirmation prompts.
Definition config.h:622
Inference parameters for a single identity phase.
Definition config.h:1063
int max_output_tokens
Max tokens per generation.
Definition config.h:1065
float repeat_penalty
Repetition penalty.
Definition config.h:1067
bool enable_thinking
Enable think-block output.
Definition config.h:1066
std::optional< std::vector< std::string > > bash_commands
Phase-specific bash commands.
Definition config.h:1068
float temperature
Sampling temperature.
Definition config.h:1064
Prompt caching configuration.
Definition config.h:272
size_t max_bytes
Maximum cache RAM (512 MB default)
Definition config.h:273
bool log_hits
Log cache hit/miss at INFO level.
Definition config.h:275
bool enabled
Master switch (false = no caching)
Definition config.h:274
bool warm_keep
gh#96 (v2.7.5): keep the prior turn's KV resident and re-decode only the appended delta (warm-keep / ...
Definition config.h:280
Reconnection policy configuration for external MCP servers.
Definition config.h:656
uint32_t max_retries
Max attempts (0 = infinite)
Definition config.h:659
uint32_t base_delay_ms
Initial retry delay.
Definition config.h:657
uint32_t max_delay_ms
Maximum retry delay cap.
Definition config.h:658
double backoff_factor
Exponential backoff multiplier.
Definition config.h:660
Configuration for model routing.
Definition config.h:607
std::string fallback_tier
Fallback when routing fails.
Definition config.h:609
std::unordered_map< std::string, std::vector< std::string > > handoff_rules
Tier handoff rules.
Definition config.h:612
bool enabled
Enable routing.
Definition config.h:608
std::optional< std::string > classification_prompt
Custom prompt (nullopt = auto)
Definition config.h:610
std::unordered_map< std::string, std::string > tier_map
Classification → tier mapping.
Definition config.h:611
Speculative-decoding configuration (inference.speculative.
Definition config.h:932
bool enabled
Master switch (off by default)
Definition config.h:933
bool mtp
gh#106 (v2.9.0): drive MTP (the draft is a trunk-sharing head via ctx_other) instead of the gh#36 sep...
Definition config.h:940
int n_draft
Window size (proposed tokens).
Definition config.h:934
ModelConfig draft
Full ModelConfig for the draft model.
Definition config.h:961
Storage backend configuration.
Definition config.h:730
AuditLogConfig audit_log
Audit log settings (v1.9.5)
Definition config.h:735
std::filesystem::path db_path
SQLite database path (derived from config_dir)
Definition config.h:732
size_t log_max_files
Max rotated log files to keep.
Definition config.h:734
size_t log_max_file_size
Max log file size before rotation (10MB)
Definition config.h:733
bool enabled
Enable storage backend.
Definition config.h:731
Tier-specific model configuration.
Definition config.h:442
std::string get_param(const std::string &param_name) const
Get a named parameter derived from tier config fields.
Definition config.h:560
std::optional< float > frequency_penalty
gh#85
Definition config.h:495
std::optional< bool > routable
None = defer to identity frontmatter.
Definition config.h:447
std::optional< std::filesystem::path > identity
Identity prompt path (nullopt = bundled)
Definition config.h:443
std::optional< float > temperature
Per-tier sampler temperature from identity frontmatter (gh#82).
Definition config.h:479
std::optional< float > top_p
Per-tier sampler knobs from identity frontmatter (gh#85).
Definition config.h:491
bool has_capability(const std::string &name) const
Return true if this tier declares the named capability.
Definition config.h:541
std::optional< float > repeat_penalty
Per-tier repeat_penalty + enable_thinking from identity frontmatter (gh#86).
Definition config.h:502
std::optional< std::string > auto_chain
Target tier name (nullopt = defer to identity)
Definition config.h:446
bool identity_disabled
true if identity explicitly disabled
Definition config.h:444
std::optional< float > min_p
gh#85
Definition config.h:493
std::optional< bool > require_tool_call
gh#134 (v2.10.4): require this tier to end every turn with a tool call.
Definition config.h:532
std::optional< std::string > tool_call_mode
Per-tier tool-call generation mode (gh#103).
Definition config.h:510
std::optional< float > presence_penalty
gh#85
Definition config.h:494
float adapter_scale
LoRA scaling factor (0.0–2.0, default 1.0).
Definition config.h:456
std::optional< int > max_output_tokens
Per-tier max output tokens from identity frontmatter (gh#82).
Definition config.h:484
std::optional< std::filesystem::path > adapter_path
Optional path to LoRA adapter .gguf file.
Definition config.h:452
std::optional< int > top_k
gh#85
Definition config.h:492
std::optional< bool > enable_thinking
gh#86
Definition config.h:503
std::vector< std::string > capabilities
Declared tier capabilities (gh#41).
Definition config.h:472
std::optional< std::filesystem::path > grammar
Grammar file path.
Definition config.h:445
std::optional< bool > speculative_mtp
Per-tier MTP speculative-decode override (gh#108).
Definition config.h:519