Skip to main content

Module config

Module config 

Source
Expand description

RuntimeConfig, BackendId, NamespaceToken, and embedding model helpers.

Structs§

BackendId
Identifies a named backend in a multi-backend deployment.
NamespaceToken
Authorization proof that a caller is permitted to access a specific namespace.
RuntimeConfig
Runtime configuration.

Enums§

BackendIdError
Validation error returned when a backend identifier is rejected.

Functions§

ann_fresh_tail_enabled_from_env
Sample ADR-118’s fresh-tail escape hatch for runtime construction.
assert_captured_db_anchor_consistent
Assert that a resolved db_path: which compute_config_id folds into a process’s config_id: agrees with the database anchor captured from the same --db/KHIVE_DB input at the construction boundary.
assert_db_anchor_consistent
Assert that a resolved db_path: which compute_config_id folds into a process’s config_id: agrees with what resolve_db_anchor derives from the same raw --db/KHIVE_DB input.
expand_tilde
Expand a leading ~ to $HOME in a path.
parse_pack_list
Parse a comma- or whitespace-separated pack list from a single string.
process_ref_from_env
Read the optional request-origin process reference without normalization.
resolve_db_anchor
Resolve the --db/KHIVE_DB value into the anchor path used for tier-3 project-local .khive/config.toml discovery, mirroring the precedence kkernel mcp and kkernel exec use to open the database itself: :memory: has no file to anchor on (None); an explicit path anchors on that path (with a leading ~ expanded via expand_tilde); an unset value falls back to $HOME/.khive/khive.db, or ./.khive/khive.db when HOME is unset.
resolve_default_display_timezone
Resolve the host’s local IANA zone name once, for RuntimeConfig’s default display_timezone (ADR-169). Falls back to UTC when the host zone cannot be determined (e.g. TZ//etc/localtime unreadable) or does not parse as a known chrono_tz::Tz — this must never panic or block construction of a default RuntimeConfig.
resolve_project_actor_id
Resolve the per-connection attribution actor from the project/cwd-anchored config tier, independently of the database-anchored config load that governs config_id.
runtime_config_from_khive_config
Build a RuntimeConfig from a parsed KhiveConfig.