Entropic 2.14.3
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
174 bool gpu_layers_auto = false;
175
184 bool keep_warm = false;
185
186 bool use_mlock = true;
187
220
221 /* ── llama.cpp pass-through ────────────────────────── */
223 std::string cache_type_k = "f16";
224 std::string cache_type_v = "f16";
225 int n_batch = 512;
226
237 int n_ubatch = 0;
238
239 int n_threads = 0;
240 std::string tensor_split;
241
251 std::string split_mode;
252
259 int main_gpu = 0;
260
267 bool offload_kqv = true;
268
277 float rope_freq_base = 0.0f;
278
287 float rope_freq_scale = 0.0f;
288
297 int n_parallel = 1;
298
314
315 bool flash_attn = true;
316
317 /* ── Tool filtering ────────────────────────────────── */
318 std::optional<std::vector<std::string>> allowed_tools;
319
320 /* ── Vision / multimodal (v1.9.11) ────────────────── */
321
326 std::filesystem::path mmproj_path;
327
328 /* ── Model format (v1.9.13) ───────────────────────── */
329
336 std::string model_format = "gguf";
337};
338
349 size_t max_bytes = 536870912;
350 bool enabled = true;
351 bool log_hits = true;
356 bool warm_keep = true;
357};
358
373 std::string name;
374 int n_batch = 512;
375 int n_threads = 0;
377 std::string description;
378};
379
397 std::string session_key;
398
399 float temperature = 0.7f;
400 float top_p = 0.9f;
401 int top_k = 40;
402 float repeat_penalty = 1.1f;
403
411 float min_p = 0.0f;
412
418 float presence_penalty = 0.0f;
419
432 std::unordered_map<int32_t, float> logit_bias;
433
445 float frequency_penalty = 0.0f;
446
447 int max_tokens = 4096;
448
452 int seed = -1;
454 bool enable_thinking = true;
455 std::string grammar;
460 std::string grammar_key;
461
471
479 bool grammar_from_tier = false;
480
481 std::vector<std::string> stop;
488 std::string tool_call_mode;
489 int logprobs = 0;
490
491 /* ── v1.9.7: Time cap + profile fields ────────────── */
492
497
502 std::string profile;
503
509 bool auto_adapt = true;
510
514 float adapt_headroom = 0.9f;
515
527 std::string tools;
528};
529
548 std::optional<std::filesystem::path> identity;
549 bool identity_disabled = false;
550 std::optional<std::filesystem::path> grammar;
551 std::optional<std::string> auto_chain;
552 std::optional<bool> routable;
553
564 bool requires_context = false;
565
569 std::optional<std::filesystem::path> adapter_path;
570
573 float adapter_scale = 1.0f;
574
589 std::vector<std::string> capabilities;
590
596 std::optional<float> temperature;
597
601 std::optional<int> max_output_tokens;
602
608 std::optional<float> top_p;
609 std::optional<int> top_k;
610 std::optional<float> min_p;
611 std::optional<float> presence_penalty;
612 std::optional<float> frequency_penalty;
613
619 std::optional<float> repeat_penalty;
620 std::optional<bool> enable_thinking;
627 std::optional<std::string> tool_call_mode;
628
636 std::optional<bool> speculative_mtp;
637
649 std::optional<bool> require_tool_call;
650
658 bool has_capability(const std::string& name) const {
659 for (const auto& c : capabilities) {
660 if (c == name) { return true; }
661 }
662 return false;
663 }
664
677 std::string get_param(const std::string& param_name) const {
678 if (param_name == "explicit_completion") {
679 return auto_chain.has_value() ? "false" : "true";
680 }
681 return "";
682 }
683};
684
690 std::unordered_map<std::string, TierConfig> tiers;
691 std::optional<ModelConfig> router;
692 std::string default_tier = "lead";
693
710 bool defer_load = false;
711
723 std::string find_tier_by_path(
724 const std::filesystem::path& model_path) const {
725 for (const auto& [name, tier] : tiers) {
726 if (tier.path == model_path) { return name; }
727 }
728 return "";
729 }
730};
731
743 bool enabled = false;
744 std::string fallback_tier = "lead";
745 std::optional<std::string> classification_prompt;
746 std::unordered_map<std::string, std::string> tier_map;
747 std::unordered_map<std::string, std::vector<std::string>> handoff_rules;
748};
749
755 std::vector<std::string> allow;
756 std::vector<std::string> deny;
757 bool auto_approve = false;
758};
759
772 refuse,
773 allow,
774 optional,
775};
776
783 bool fail_on_errors = true;
784 float diagnostics_timeout = 1.0f;
785
807
813 std::vector<std::filesystem::path> outside_root_allow;
814
821 std::vector<std::filesystem::path> outside_root_deny;
822
827 std::optional<int> max_read_bytes;
828 float max_read_context_pct = 0.25f;
829
849 int max_walk_entries = 250000;
850};
851
857 bool enabled = false;
858 std::optional<std::filesystem::path> socket_path;
863 int rate_limit = 10;
867 bool ask_streaming = true;
868
877 int http_port = 0;
878
887 std::string tool_prefix = "entropic";
888
897 std::string server_name = "entropic";
898
908 std::unordered_map<std::string, std::string> tool_descriptions;
909};
910
925};
926
937
943 std::string command;
944 std::vector<std::string> args;
945 std::unordered_map<std::string, std::string> env;
946 std::string url;
947};
948
953struct MCPConfig {
954 bool enable_entropic = true;
955 bool enable_filesystem = true;
956 bool enable_bash = true;
957 bool enable_git = true;
958 bool enable_diagnostics = false;
959 bool enable_web = false;
976 std::string working_dir;
977
987 std::vector<std::filesystem::path> plugins;
988
989 /* ── v1.8.7: External MCP client settings ──────────── */
1001 std::unordered_map<std::string, ExternalServerEntry> external_servers;
1002
1003 /* ── v2.14.0: .mcp.json discovery, Claude-Code style ─── */
1013 std::vector<std::string> enabled_mcpjson_servers;
1016 std::vector<std::string> disabled_mcpjson_servers;
1023};
1024
1035 std::filesystem::path log_dir;
1036 std::string session_id;
1037 bool enabled = true;
1039 size_t max_file_size = 0;
1040 size_t max_files = 5;
1041};
1042
1048 bool enabled = true;
1049 std::filesystem::path db_path;
1050 size_t log_max_file_size = 10 * 1024 * 1024;
1051 size_t log_max_files = 3;
1053};
1054
1069
1075 none,
1076 sandbox,
1077};
1078
1105
1111 int max_tokens = 4096;
1112 float default_temperature = 0.7f;
1113 float default_top_p = 0.9f;
1114
1121 std::string budget_mode = "off";
1122
1129
1138 bool stream_output = true;
1139};
1140
1146 std::string command;
1147 std::vector<std::string> args;
1148 std::vector<std::string> extensions;
1149};
1150
1156 bool enabled = true;
1157 bool python_enabled = true;
1158 bool c_enabled = true;
1159 std::unordered_map<std::string, LSPServerConfig> servers;
1160};
1161
1178 bool enabled = false;
1181 float temperature = 0.0f;
1182 bool enable_thinking = false;
1183 int priority = 100;
1184 std::string grammar_key = "constitutional_critique";
1186 std::vector<std::string> skip_tiers = {"lead"};
1191 std::string critique_tier;
1192};
1193
1234 cfg.gpu_layers = 0;
1235 cfg.flash_attn = false;
1236 cfg.context_length = 8192;
1237 cfg.n_threads = 4;
1238 return cfg;
1239}
1240
1316
1329
1446
1457 float temperature = 0.7f;
1459 bool enable_thinking = false;
1460 float repeat_penalty = 1.1f;
1461 std::optional<std::vector<std::string>> bash_commands;
1462};
1463
1464} // 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).
OutsideRootAccess
What the filesystem server does with a path outside its root.
Definition config.h:771
@ refuse
false: every escape refused ("Path escapes project root")
@ allow
true: every escape served, no prompt
@ optional
optional: every escape asks the host's path approver
@ tier
The TIER's identity frontmatter grammar: stem (gh#154).
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:1232
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)
DelegationIsolation
How a delegation's filesystem writes are contained (gh#160).
Definition config.h:1074
@ none
Child tools share the session's working dir (default)
@ sandbox
Child tools run in a copy; output is a patch.
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:1034
size_t max_file_size
Rotation size in bytes (0 = unlimited)
Definition config.h:1039
size_t flush_interval_entries
Flush every N entries (0 = every entry)
Definition config.h:1038
std::string session_id
UUID for this session.
Definition config.h:1036
std::filesystem::path log_dir
Directory for audit log files.
Definition config.h:1035
bool enabled
Master toggle for audit logging.
Definition config.h:1037
size_t max_files
Max rotated files to keep.
Definition config.h:1040
Bash MCP server configuration (v2.13.0).
Definition config.h:923
int timeout_seconds
Per-command wall-clock limit (>= 1)
Definition config.h:924
Auto-compaction configuration.
Definition config.h:1059
bool save_full_history
Save full history before compaction.
Definition config.h:1065
bool notify_user
Notify user on compaction.
Definition config.h:1064
float warning_threshold_percent
Warning trigger (0.3–0.9)
Definition config.h:1067
int preserve_recent_turns
Turns to preserve (1–10)
Definition config.h:1062
int summary_max_tokens
Summary max tokens (500–4000)
Definition config.h:1063
int tool_result_ttl
Tool result TTL in turns (>= 1; v2.1.3 #6: gated on fill, no upper bound)
Definition config.h:1066
float threshold_percent
Compaction trigger (0.5–0.99)
Definition config.h:1061
bool enabled
Enable auto-compaction.
Definition config.h:1060
Constitutional validation pipeline configuration.
Definition config.h:1177
int max_revisions
Max re-generation attempts (0 = critique only)
Definition config.h:1179
int priority
Hook priority (higher = later)
Definition config.h:1183
bool enable_thinking
Enable think-blocks for critique (default OFF)
Definition config.h:1182
float temperature
Critique generation temperature.
Definition config.h:1181
bool enabled
Global enable/disable (default OFF)
Definition config.h:1178
std::string critique_tier
Tier to route critique generation on.
Definition config.h:1191
int max_critique_tokens
Token budget for critique generation.
Definition config.h:1180
std::string grammar_key
Grammar registry key.
Definition config.h:1184
std::vector< std::string > skip_tiers
Tiers exempt from validation (default: lead — streams before hook fires)
Definition config.h:1186
Delegation behaviour knobs (gh#160, v2.13.0).
Definition config.h:1102
DelegationIsolation isolation
Default: none.
Definition config.h:1103
External MCP server configuration (Entropic-as-server).
Definition config.h:856
bool ask_streaming
Route entropic.ask through entropic_run (false) or entropic_run_streaming (true, default).
Definition config.h:867
int http_port
Also serve the bridge over Streamable HTTP on 127.0.0.1:<port> (gh#204, v2.14.0).
Definition config.h:877
std::string tool_prefix
Namespace for the tools this bridge advertises (gh#145).
Definition config.h:887
std::optional< std::filesystem::path > socket_path
Socket path (nullopt = derived)
Definition config.h:858
std::string server_name
serverInfo.name reported in the MCP initialize response (gh#145).
Definition config.h:897
int rate_limit
NOT ENFORCED.
Definition config.h:863
std::unordered_map< std::string, std::string > tool_descriptions
Optional per-tool description overrides, keyed by bare suffix ("ask", "status", "context_clear",...
Definition config.h:908
bool enabled
Enable external MCP.
Definition config.h:857
Configuration for a single external MCP server entry.
Definition config.h:942
std::string command
Stdio command (empty for SSE)
Definition config.h:943
std::vector< std::string > args
Stdio command arguments.
Definition config.h:944
std::string url
SSE endpoint URL (empty for stdio)
Definition config.h:946
std::unordered_map< std::string, std::string > env
Stdio environment variables.
Definition config.h:945
Filesystem MCP server configuration.
Definition config.h:781
bool diagnostics_on_edit
Proactive diagnostics on edit/write.
Definition config.h:782
float diagnostics_timeout
Diagnostics timeout (0.1–5.0)
Definition config.h:784
std::vector< std::filesystem::path > outside_root_allow
Pre-approved subtrees outside the root — no prompt (v2.13.0).
Definition config.h:813
std::optional< int > max_read_bytes
Byte budget of ONE read_file window (nullopt = derive from context).
Definition config.h:827
float max_read_context_pct
Context share for one read_file window (when max_read_bytes is unset)
Definition config.h:828
std::vector< std::filesystem::path > outside_root_deny
Subtrees outside the root that are ALWAYS refused (v2.13.0).
Definition config.h:821
int max_walk_entries
Hard cap on directory entries visited by ONE glob or grep walk; <= 0 disables the cap (gh#161).
Definition config.h:849
OutsideRootAccess allow_outside_root
Paths OUTSIDE the root: refuse, allow, or ask (v2.13.0).
Definition config.h:806
bool fail_on_errors
Rollback edit if it introduces errors.
Definition config.h:783
Named GPU resource profile for controlling inference hardware knobs.
Definition config.h:372
int n_threads_batch
CPU threads for batch processing (0 = use n_threads)
Definition config.h:376
int n_batch
Batch size for prompt processing (1-2048)
Definition config.h:374
std::string name
Profile name ("maximum", "balanced", "background", "minimal")
Definition config.h:373
int n_threads
CPU threads for generation (0 = auto-detect)
Definition config.h:375
std::string description
Human-readable description.
Definition config.h:377
Generation parameters configuration (top-level defaults).
Definition config.h:1110
int max_tokens
Default max tokens (64–32768)
Definition config.h:1111
float default_top_p
Default top_p (0.0–1.0)
Definition config.h:1113
int budget_limit
gh#80 (v2.5.0) budget ceiling: generated tokens (budget_mode "tokens") or wall-clock seconds (budget_...
Definition config.h:1128
std::string budget_mode
gh#80 (v2.5.0) thinking-budget mode: "off" (default), "tokens", or "wall_clock".
Definition config.h:1121
float default_temperature
Default temperature (0.0–2.0)
Definition config.h:1112
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:1138
Generation parameters for a single inference call.
Definition config.h:389
int time_limit_ms
Wall-clock time cap in milliseconds.
Definition config.h:496
int reasoning_budget
Per-call think budget override (-1 = unlimited)
Definition config.h:453
std::string grammar
GBNF grammar string (empty = unconstrained)
Definition config.h:455
std::string profile
GPU resource profile name.
Definition config.h:502
std::string tool_call_mode
Per-call tool-call generation mode (gh#103).
Definition config.h:488
int top_k
Top-K sampling.
Definition config.h:401
bool auto_adapt
Enable throughput-based max_tokens auto-adaptation.
Definition config.h:509
bool grammar_from_tier
true when resolved_grammar_key came from the TIER's frontmatter grammar: rather than the caller (gh#1...
Definition config.h:479
std::unordered_map< int32_t, float > logit_bias
Per-token logit bias map (gh#23 MVP item 4).
Definition config.h:432
float repeat_penalty
Repetition penalty.
Definition config.h:402
std::string tools
Active tool definitions for this turn, as an MCP tool-list JSON array ([{name, description,...
Definition config.h:527
float temperature
Sampling temperature.
Definition config.h:399
std::string grammar_key
Grammar registry key.
Definition config.h:460
float frequency_penalty
Frequency-penalty term in llama.cpp's penalties sampler (gh#23 MVP item 3).
Definition config.h:445
float presence_penalty
Presence-penalty term in llama.cpp's penalties sampler (gh#23 MVP item 2).
Definition config.h:418
std::string resolved_grammar_key
The key or frontmatter stem that was NAMED for this call, set by ModelOrchestrator::resolve_grammar_k...
Definition config.h:470
bool enable_thinking
Enable <think> blocks (false if reasoning_budget == 0)
Definition config.h:454
int logprobs
Top log-probs per token (0 = disabled)
Definition config.h:489
float adapt_headroom
Target time usage fraction for auto-adaptation.
Definition config.h:514
std::string session_key
Caller-scoped session this generation belongs to (gh#144).
Definition config.h:397
float min_p
Min-p nucleus sampling threshold (gh#23 MVP item 1).
Definition config.h:411
int max_tokens
Maximum tokens to generate.
Definition config.h:447
float top_p
Nucleus sampling threshold.
Definition config.h:400
int seed
RNG seed for reproducible sampling.
Definition config.h:452
std::vector< std::string > stop
Stop sequences.
Definition config.h:481
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:1326
SpeculativeConfig speculative
Speculative decoding (gh#36)
Definition config.h:1327
LSP integration configuration.
Definition config.h:1155
bool python_enabled
Enable Python LSP.
Definition config.h:1157
bool enabled
Enable LSP integration.
Definition config.h:1156
bool c_enabled
Enable C/C++ LSP.
Definition config.h:1158
std::unordered_map< std::string, LSPServerConfig > servers
Custom server overrides.
Definition config.h:1159
Configuration for a single LSP server.
Definition config.h:1145
std::string command
Server command.
Definition config.h:1146
std::vector< std::string > args
Command arguments.
Definition config.h:1147
std::vector< std::string > extensions
File extensions.
Definition config.h:1148
MCP server configuration.
Definition config.h:953
ReconnectConfig reconnect
Reconnection backoff policy.
Definition config.h:1020
bool enable_entropic
Enable entropic internal server (handoff, delegate, pipeline)
Definition config.h:954
std::vector< std::filesystem::path > plugins
In-process MCP server plugin .so paths (gh#133, v2.10.1).
Definition config.h:987
std::vector< std::string > enabled_mcpjson_servers
.mcp.json servers pre-approved by name (gh#199).
Definition config.h:1013
FilesystemConfig filesystem
Filesystem server config.
Definition config.h:960
std::vector< std::string > disabled_mcpjson_servers
.mcp.json servers always refused, even under enable-all.
Definition config.h:1016
bool enable_filesystem
Enable filesystem server.
Definition config.h:955
BashConfig bash
Bash server config (v2.13.0)
Definition config.h:961
std::unordered_map< std::string, ExternalServerEntry > external_servers
Named external servers the operator declared (v1.8.7).
Definition config.h:1001
bool enable_git
Enable git server.
Definition config.h:957
bool enable_diagnostics
Diagnostics server — placeholder, off by default (v2.14.0, gh#174)
Definition config.h:958
int server_timeout_seconds
Seconds an external MCP server gets to come up: the initialize handshake and its tools/list,...
Definition config.h:975
uint32_t health_check_interval_ms
Ping interval (0 = disabled)
Definition config.h:1021
uint32_t tool_call_timeout_ms
Per-call timeout for external tools.
Definition config.h:1022
bool enable_bash
Enable bash server.
Definition config.h:956
ExternalMCPConfig external
External MCP server config (Entropic-as-server)
Definition config.h:962
bool enable_all_project_mcp_servers
Pre-approve every discovered server not explicitly disabled.
Definition config.h:1019
std::string working_dir
Server working directory (empty = CWD) (v2.0.4)
Definition config.h:976
bool enable_web
Web server — placeholder, off by default (v2.14.0, gh#174)
Definition config.h:959
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:326
int gpu_layers
GPU offload layers (-1 = all)
Definition config.h:158
int reasoning_budget
Think token budget (-1 = unlimited)
Definition config.h:222
int n_ubatch
Physical micro-batch size for prompt processing (gh#23 MVP item 5).
Definition config.h:237
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:336
int cpu_moe_layers
EXPERIMENTAL: layers whose ROUTED-EXPERT tensors go to the host while everything else follows gpu_lay...
Definition config.h:219
float rope_freq_scale
RoPE frequency scaling factor (gh#23 MVP item 10).
Definition config.h:287
int main_gpu
Primary GPU index for model load (gh#23 MVP item 7).
Definition config.h:259
int max_sessions
Resident per-caller conversation sessions this tier keeps KV for (gh#144).
Definition config.h:313
int n_threads
CPU threads (0 = auto-detect)
Definition config.h:239
bool offload_kqv
Offload KQV ops (incl.
Definition config.h:267
int n_parallel
Max parallel sequences per context (gh#23 MVP item 11).
Definition config.h:297
std::string tensor_split
Multi-GPU tensor split ratios (empty = single GPU)
Definition config.h:240
bool gpu_layers_auto
Derive gpu_layers from free VRAM at admission (gh#148).
Definition config.h:174
std::string cache_type_k
KV cache key quantization type.
Definition config.h:223
bool keep_warm
Keep this model resident in host RAM (WARM) when it leaves the active slot, instead of unloading it (...
Definition config.h:184
std::string cache_type_v
KV cache value quantization type.
Definition config.h:224
std::string split_mode
Multi-GPU split mode for model load (gh#23 MVP item 6).
Definition config.h:251
int n_batch
Batch size for prompt processing.
Definition config.h:225
bool flash_attn
Enable flash attention.
Definition config.h:315
bool use_mlock
Lock model in system RAM.
Definition config.h:186
std::optional< std::vector< std::string > > allowed_tools
Tool whitelist (nullopt = all)
Definition config.h:318
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:277
Configuration for all models (tiers + router).
Definition config.h:689
std::optional< ModelConfig > router
Router model (separate from tiers)
Definition config.h:691
bool defer_load
Defer the default tier's model load to first use (gh#157).
Definition config.h:710
std::unordered_map< std::string, TierConfig > tiers
Tier name → config.
Definition config.h:690
std::string find_tier_by_path(const std::filesystem::path &model_path) const
Find tier name by model path.
Definition config.h:723
std::string default_tier
Default tier name.
Definition config.h:692
Full parsed configuration.
Definition config.h:1338
int vram_reserve_mb
Reserved VRAM headroom (MB, 0–65536)
Definition config.h:1409
StorageConfig storage
Storage backend settings (v1.8.8)
Definition config.h:1348
PermissionsConfig permissions
Tool permissions.
Definition config.h:1342
PromptCacheConfig prompt_cache
Prompt KV cache settings.
Definition config.h:1347
DelegationConfig delegation
Delegation isolation (gh#160)
Definition config.h:1345
std::optional< std::filesystem::path > app_context
App context: nullopt = disabled by default.
Definition config.h:1356
std::optional< std::string > app_context_content
Inline app_context text, supplied instead of a path (gh#141).
Definition config.h:1367
CompactionConfig compaction
Auto-compaction settings.
Definition config.h:1344
RoutingConfig routing
Routing rules.
Definition config.h:1340
InferenceConfig inference
Inference-side knobs (currently speculative decoding only).
Definition config.h:1444
bool concurrent_sessions
gh#158 (v2.13.0): may DIFFERENT session keys run together?
Definition config.h:1406
ModelsConfig models
Tiers + router.
Definition config.h:1339
LSPConfig lsp
LSP integration.
Definition config.h:1346
ConstitutionalValidationConfig constitutional_validation
Constitutional validation pipeline settings.
Definition config.h:1440
std::filesystem::path log_dir
Session log directory (session.log + session_model.log).
Definition config.h:1416
bool ggml_logging
Enable ggml/llama.cpp logging to llama_ggml.log in log_dir.
Definition config.h:1420
std::filesystem::path workspace_app_context
Per-workspace app_context file, relative to each workspace root (gh#179, v2.14.0).
Definition config.h:1381
GenerationConfig generation
Default generation params.
Definition config.h:1341
std::string log_level
Log level string.
Definition config.h:1349
MCPConfig mcp
MCP server settings.
Definition config.h:1343
bool console_logging
Emit engine spdlog output to the stderr console sink.
Definition config.h:1437
bool inject_model_context
Auto-inject model context into system prompt.
Definition config.h:1408
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:1430
bool app_context_disabled
true if app_context explicitly disabled
Definition config.h:1357
std::optional< std::filesystem::path > constitution
Constitution: nullopt = bundled default, disabled = explicit false.
Definition config.h:1352
bool constitution_disabled
true if constitution explicitly disabled
Definition config.h:1353
std::filesystem::path config_dir
Config dir — base for bundled data discovery.
Definition config.h:1412
Tool permission configuration.
Definition config.h:754
std::vector< std::string > deny
Denied tool patterns (glob)
Definition config.h:756
std::vector< std::string > allow
Allowed tool patterns (glob)
Definition config.h:755
bool auto_approve
Skip confirmation prompts.
Definition config.h:757
Inference parameters for a single identity phase.
Definition config.h:1456
int max_output_tokens
Max tokens per generation.
Definition config.h:1458
float repeat_penalty
Repetition penalty.
Definition config.h:1460
bool enable_thinking
Enable think-block output.
Definition config.h:1459
std::optional< std::vector< std::string > > bash_commands
Phase-specific bash commands.
Definition config.h:1461
float temperature
Sampling temperature.
Definition config.h:1457
Prompt caching configuration.
Definition config.h:348
size_t max_bytes
Maximum cache RAM (512 MB default)
Definition config.h:349
bool log_hits
Log cache hit/miss at INFO level.
Definition config.h:351
bool enabled
Master switch (false = no caching)
Definition config.h:350
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:356
Reconnection policy configuration for external MCP servers.
Definition config.h:931
uint32_t max_retries
Max attempts (0 = infinite)
Definition config.h:934
uint32_t base_delay_ms
Initial retry delay.
Definition config.h:932
uint32_t max_delay_ms
Maximum retry delay cap.
Definition config.h:933
double backoff_factor
Exponential backoff multiplier.
Definition config.h:935
Configuration for model routing.
Definition config.h:742
std::string fallback_tier
Fallback when routing fails.
Definition config.h:744
std::unordered_map< std::string, std::vector< std::string > > handoff_rules
Tier handoff rules.
Definition config.h:747
bool enabled
Enable routing.
Definition config.h:743
std::optional< std::string > classification_prompt
Custom prompt (nullopt = auto)
Definition config.h:745
std::unordered_map< std::string, std::string > tier_map
Classification → tier mapping.
Definition config.h:746
Speculative-decoding configuration (inference.speculative.
Definition config.h:1285
bool enabled
Master switch (off by default)
Definition config.h:1286
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:1293
int n_draft
Window size (proposed tokens).
Definition config.h:1287
ModelConfig draft
Full ModelConfig for the draft model.
Definition config.h:1314
Storage backend configuration.
Definition config.h:1047
AuditLogConfig audit_log
Audit log settings (v1.9.5)
Definition config.h:1052
std::filesystem::path db_path
SQLite database path (derived from config_dir)
Definition config.h:1049
size_t log_max_files
Max rotated log files to keep.
Definition config.h:1051
size_t log_max_file_size
Max log file size before rotation (10MB)
Definition config.h:1050
bool enabled
Enable storage backend.
Definition config.h:1048
Tier-specific model configuration.
Definition config.h:547
std::string get_param(const std::string &param_name) const
Get a named parameter derived from tier config fields.
Definition config.h:677
std::optional< float > frequency_penalty
gh#85
Definition config.h:612
std::optional< bool > routable
None = defer to identity frontmatter.
Definition config.h:552
std::optional< std::filesystem::path > identity
Identity prompt path (nullopt = bundled)
Definition config.h:548
std::optional< float > temperature
Per-tier sampler temperature from identity frontmatter (gh#82).
Definition config.h:596
std::optional< float > top_p
Per-tier sampler knobs from identity frontmatter (gh#85).
Definition config.h:608
bool has_capability(const std::string &name) const
Return true if this tier declares the named capability.
Definition config.h:658
std::optional< float > repeat_penalty
Per-tier repeat_penalty + enable_thinking from identity frontmatter (gh#86).
Definition config.h:619
std::optional< std::string > auto_chain
Target tier name (nullopt = defer to identity)
Definition config.h:551
bool identity_disabled
true if identity explicitly disabled
Definition config.h:549
bool requires_context
gh#162 (v2.13.0): refuse a delegation to this tier that carries no context file references.
Definition config.h:564
std::optional< float > min_p
gh#85
Definition config.h:610
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:649
std::optional< std::string > tool_call_mode
Per-tier tool-call generation mode (gh#103).
Definition config.h:627
std::optional< float > presence_penalty
gh#85
Definition config.h:611
float adapter_scale
LoRA scaling factor (0.0–2.0, default 1.0).
Definition config.h:573
std::optional< int > max_output_tokens
Per-tier max output tokens from identity frontmatter (gh#82).
Definition config.h:601
std::optional< std::filesystem::path > adapter_path
Optional path to LoRA adapter .gguf file.
Definition config.h:569
std::optional< int > top_k
gh#85
Definition config.h:609
std::optional< bool > enable_thinking
gh#86
Definition config.h:620
std::vector< std::string > capabilities
Declared tier capabilities (gh#41).
Definition config.h:589
std::optional< std::filesystem::path > grammar
Grammar file path.
Definition config.h:550
std::optional< bool > speculative_mtp
Per-tier MTP speculative-decode override (gh#108).
Definition config.h:636