Expand description
Runtime config: flag > XDG > default (no product env) — G-T-XDG-04. Runtime configuration resolved without product environment variables.
Precedence (G-T-XDG-04 / plan v4): CLI flag > XDG config set > named default.
Product SQLITE_GRAPHRAG_* / OPENROUTER_* env vars are not read for config.
OS env allowed only for process identity: HOME, PATH, XDG_*, locale, NO_COLOR.
Structs§
- Path
Overrides - Directory overrides installed BEFORE anything reads
config.toml. - Runtime
Overrides - Process-wide overrides captured once from CLI flags at bootstrap.
Functions§
- agent_
surface_ max_ items - GAP-SG-142: cap on emitted result elements, from
--max-itemsor XDGagent_surface.max_items. - agent_
surface_ max_ output_ bytes - GAP-SG-142: cap on the serialized envelope in bytes, from
--max-output-bytesor XDGagent_surface.max_output_bytes.0disables the ceiling. - agent_
surface_ truncate_ content - GAP-SG-142: cap on string length in characters, from
--truncate-contentor XDGagent_surface.truncate_content.0disables truncation. - cache_
dir_ override - CLI
--cache-dir> XDGcache.dir>None(caller applies the OS default). - config_
dir_ override - CLI
--config-dironly. - db_
busy_ base_ delay_ ms - Base backoff for the first SQLITE_BUSY retry, from XDG
db.busy_base_delay_ms. - db_
busy_ retries - SQLITE_BUSY retry budget, from XDG
db.busy_retries. - db_
query_ timeout_ ms - Per-statement query timeout, from XDG
db.query_timeout_ms. - embed_
runtime_ worker_ threads - Worker count for the shared embedding Tokio runtime, from XDG
parallelism.embed_runtime_threads(GAP-SG-141 B2). - embedding_
backend - Embedding backend: CLI
--embedding-backend> XDGembedding.backend>auto. - embedding_
batch_ size - Embedding batch size, from XDG
embedding.batch_size. - embedding_
dim_ override - Embedding dim: CLI override > XDG
embedding.dim> None (caller uses DB/default). - embedding_
model - Embedding model: CLI
--embedding-model> XDGembedding.model>None. - enrich_
circuit_ breaker_ reset_ secs - Cooldown of a tripped per-worker circuit breaker, from XDG
enrich.circuit_breaker_reset_secs. - enrich_
scan_ page_ size - GAP-SG-185: keyset page size for enrich scan collectors.
- get
- Borrow installed overrides (empty defaults if init was skipped — tests).
- init
- Install CLI-captured overrides. Idempotent first-wins (main bootstrap).
- init_
paths - Install directory overrides. Idempotent first-wins.
- llm_
backend - LLM backend for embedding: CLI
--llm-backend> XDGllm.backend>open-router. - llm_
fallback - LLM fallback.
- llm_
max_ host_ concurrency - Host concurrency for LLM slots.
- llm_
model - LLM model.
- llm_
probe_ timeout_ ms - Probe timeout for fail-fast LLM backend readiness (ms).
- llm_
slot_ no_ wait - LLM slot no wait.
- llm_
slot_ wait_ secs - LLM slot wait secs.
- log_
format - Log format.
- log_
level - Log level.
- max_
entities_ per_ memory - Max entities per memory.
- max_
relations_ per_ memory - Max relations per memory.
- no_
input - Whether this invocation refuses to read stdin: CLI
--no-input> XDGcli.no_input>false. - openrouter_
chat_ timeout_ secs - Effective OpenRouter CHAT budget in seconds:
--openrouter-timeout, then XDGllm.openrouter_timeout_secs, thendefault. - openrouter_
chat_ url - OpenRouter chat URL: XDG override or compile-time default.
Canonical key:
network.openrouter.chat_url; alias:network.chat_url. - openrouter_
embeddings_ url - OpenRouter embeddings URL: XDG override or compile-time default.
Canonical key:
network.openrouter.embeddings_url; alias:network.embed_url. - openrouter_
timeout_ override - CLI
--openrouter-timeoutas passed, with no XDG or constant layered on. - rate_
limit_ deadline_ secs - Deadline a drain keeps absorbing provider rate limits, from XDG
enrich.rate_limit_deadline_secs. - rayon_
threads - Worker count for the global Rayon pool, from XDG
parallelism.rayon_threads. - reembed_
claim_ batch - GAP-SG-141 (B1): how many
ReEmbedqueue rows one claim takes, from XDGenrich.reembed_claim_batch. - resolve_
bool - Bool: CLI true wins; else XDG “1”/“true”/“yes”; else default.
- resolve_
f64 - Parse f64 from flag > XDG > default.
- resolve_
optional_ string - flag_opt > XDG setting > None.
- resolve_
string - flag_opt > XDG setting > default.
- resolve_
u64 - Parse u64 from flag > XDG > default.
- resolve_
usize - Parse usize from flag > XDG > default.
- skip_
embedding_ on_ failure - Skip embedding on failure: runtime flag or XDG.
- stdin_
timeout_ secs - Deadline for reading a body from stdin, from XDG
cli.stdin_timeout_secs.