Expand description
Compile-time constants: embedding dimensions, limits and thresholds. Compile-time constants shared across the crate.
Grouped into embedding configuration, length and size limits, SQLite
pragmas and retrieval tuning knobs. Values are taken from the PRD and
must stay in sync with the migrations under migrations/.
§Cálculo dinâmico de permits de concorrência
O número máximo de instâncias simultâneas pode ser ajustado em runtime usando a fórmula:
permits = min(cpus, available_memory_mb / EMBEDDING_LOAD_EXPECTED_RSS_MB) * 0.5onde available_memory_mb é obtido via sysinfo::System::available_memory()
convertido para MiB. O resultado é limitado superiormente por
MAX_CONCURRENT_CLI_INSTANCES e inferiorizado em 1.
Constants§
- BATCH_
PARTIAL_ FAILURE_ EXIT_ CODE - Exit code para falha parcial de batch (PRD linha 1822). Conflita com DbBusy em v1.x; em v2.0.0 DbBusy migra para 15 e este código assume 13 conforme PRD.
- BUSY_
TIMEOUT_ MILLIS PRAGMA busy_timeoutvalue applied on every connection.- CACHE_
SIZE_ KB PRAGMA cache_sizevalue in kibibytes (negative means KiB).- CHUNK_
OVERLAP_ TOKENS - Token overlap between consecutive chunks.
- CHUNK_
SIZE_ TOKENS - Chunk size expressed in tokens for body splitting.
- CLI_
LOCK_ DEFAULT_ WAIT_ SECS - Tempo máximo em segundos que uma instância aguarda para adquirir um slot de concorrência.
- CLI_
LOCK_ EXIT_ CODE - Process exit code returned when the lock is busy and no wait was requested (EX_TEMPFAIL).
- CLI_
LOCK_ FILE - Filename used for the advisory exclusive lock that prevents parallel invocations.
- CLI_
LOCK_ POLL_ INTERVAL_ MS - Polling interval em milliseconds usado por
--wait-lockentre tentativas detry_lock_exclusive. - DAEMON_
IDLE_ SHUTDOWN_ SECS - Idle duration in seconds before the daemon shuts itself down.
- DAEMON_
PING_ TIMEOUT_ MS - Timeout in milliseconds for a single ping probe against the daemon socket.
- DB_
BUSY_ EXIT_ CODE - Exit code para DbBusy em v2.0.0 (migrado de 13 para liberar 13 para batch failure).
- DEDUP_
FUZZY_ THRESHOLD - Jaccard threshold above which two memories are considered fuzzy duplicates.
- DEDUP_
SEMANTIC_ THRESHOLD - Cosine distance threshold below which two memories are semantic duplicates.
- DEFAULT_
K_ RECALL - Default
kused byrecallwhen the caller omits--k. - DEFAULT_
MAX_ HOPS - Default traversal depth for
relatedwhen--hopsis omitted. - DEFAULT_
MIN_ WEIGHT - Default minimum weight filter applied during graph traversal.
- DEFAULT_
RELATION_ WEIGHT - Default weight assigned to newly created relationships.
- EMBEDDING_
DIM - Embedding vector dimensionality produced by
multilingual-e5-small. - EMBEDDING_
LOAD_ EXPECTED_ RSS_ MB - RSS esperado em MiB de uma única instância com o modelo ONNX carregado via fastembed.
- EMBEDDING_
MAX_ TOKENS - Máximo de tokens aceito por embedding input antes de chunking.
- FASTEMBED_
BATCH_ SIZE - Batch size for
fastembedencoding calls. - FASTEMBED_
MODEL_ DEFAULT - Default
fastembedmodel identifier used byrememberandrecall. - K_
ENTITIES_ SEARCH - Default
kfor entity KNN searches during graph expansion. - K_
GRAPH_ ENTITIES_ DEFAULT_ LIMIT - Default
--limitparagraph entitiesquando omitido. - K_
GRAPH_ MATCHES_ LIMIT - Limite máximo de resultados da CTE recursiva de grafo em
recall. - K_
HISTORY_ DEFAULT_ LIMIT - Default
--limitparahistoryquando omitido. - K_
LIST_ DEFAULT_ LIMIT - Default
--limitparalistquando omitido. - K_
MEMORIES_ DEFAULT - Default
kfor memory KNN searches when the caller omits--k. - K_
RELATED_ DEFAULT_ LIMIT - Default
--limitpararelatedquando omitido. - LOW_
MEMORY_ EXIT_ CODE - Process exit code retornado quando memória disponível está abaixo de
MIN_AVAILABLE_MEMORY_MB. - MAX_
BODY_ CHARS_ BEFORE_ CHUNK - Body character count above which the body is split into chunks.
- MAX_
CONCURRENT_ CLI_ INSTANCES - Número máximo de instâncias CLI em execução simultânea.
- MAX_
ENTITIES_ PER_ MEMORY - Upper bound on distinct entities persisted per memory.
- MAX_
GRAPH_ HOPS - Maximum number of hops allowed in graph traversals.
- MAX_
MEMORY_ BODY_ LEN - Hard upper bound on memory
bodylength in characters. - MAX_
MEMORY_ DESCRIPTION_ LEN - Maximum character length for a memory
descriptionfield. - MAX_
MEMORY_ NAME_ LEN - Maximum byte length for a memory
namefield in kebab-case. - MAX_
NAMESPACES_ ACTIVE - Limite máximo de namespaces ativos (deleted_at IS NULL) simultâneos. Exit 5 ao exceder.
- MAX_
RELATIONSHIPS_ PER_ MEMORY - Upper bound on distinct relationships persisted per memory.
- MAX_
SQLITE_ BUSY_ RETRIES - Maximum attempts when a statement returns
SQLITE_BUSY. - MIN_
AVAILABLE_ MEMORY_ MB - Memória disponível mínima em MiB exigida antes de iniciar o carregamento do modelo.
- MIN_
RELATION_ WEIGHT - Minimum relationship weight required for traversal inclusion.
- MMAP_
SIZE_ BYTES PRAGMA mmap_sizevalue in bytes applied to each connection.- NAME_
SLUG_ REGEX - PRD-canonical regex que valida nomes e namespaces. Permite 1 char
[a-z0-9]OU string de 2-80 chars começando com letra e terminando com letra/dígito, contendo apenas[a-z0-9-]. Rejeita prefixo__(internal reserved). - OMP_
NUM_ THREADS_ DEFAULT - Valor default injetado em OMP_NUM_THREADS quando não definido pelo usuário.
- ORT_
INTRA_ OP_ NUM_ THREADS_ DEFAULT - Valor default injetado em ORT_INTRA_OP_NUM_THREADS quando não definido.
- ORT_
NUM_ THREADS_ DEFAULT - Valor default injetado em ORT_NUM_THREADS quando não definido pelo usuário.
- PASSAGE_
PREFIX - Prefix prepended to bodies before embedding as required by E5 models.
- PURGE_
RETENTION_ DAYS_ DEFAULT - Retenção padrão (dias) usada por
purgequando--retention-daysé omitido. - QUERY_
PREFIX - Prefix prepended to queries before embedding as required by E5 models.
- QUERY_
TIMEOUT_ MILLIS - Query timeout applied to statements in milliseconds.
- RRF_
K_ DEFAULT - Default
kconstant used by Reciprocal Rank Fusion inhybrid-search. - SCHEMA_
USER_ VERSION - Valor canônico de
PRAGMA user_versiongravado após migrações. - SQLITE_
GRAPHRAG_ VERSION - Crate version string sourced from
CARGO_PKG_VERSIONat build time. - TEXT_
BODY_ PREVIEW_ LEN - Tamanho em caracteres do preview do body emitido em formatos text/markdown.
- TEXT_
DESCRIPTION_ PREVIEW_ LEN - Character length of the description preview shown in
listoutput. - WAL_
AUTOCHECKPOINT_ PAGES PRAGMA wal_autocheckpointthreshold in pages.- WEIGHT_
FTS_ DEFAULT - Peso padrão da contribuição textual BM25 na fórmula RRF de
hybrid-search. - WEIGHT_
VEC_ DEFAULT - Peso padrão da contribuição vetorial na fórmula RRF de
hybrid-search.