amql_engine/meta.rs
1//! Project identity constants and accessors — single source of truth for all crates.
2//!
3//! All user-facing references to the project name, full name, or structural
4//! identifiers must derive from this module. No crate may hardcode these
5//! strings independently.
6
7/// Short identifier: binary name, config path prefix, log target.
8pub const NAME: &str = "aql";
9
10/// Full human-readable project name.
11pub const FULL_NAME: &str = "Annotation Query Language";
12
13/// Prefix applied to all MCP tool names (e.g. `aql_query`, `aql_select`).
14pub const TOOL_PREFIX: &str = "aql_";
15
16const DEFAULT_CONFIG_DIR: &str = ".config/aql";
17
18/// Config directory relative to project root.
19///
20/// Reads `AQL_CONFIG_DIR` from the environment; falls back to `.config/aql`.
21pub fn config_dir() -> String {
22 std::env::var("AQL_CONFIG_DIR").unwrap_or_else(|_| DEFAULT_CONFIG_DIR.to_string())
23}
24
25/// Schema file path relative to project root, derived from `config_dir()`.
26pub fn schema_file() -> String {
27 format!("{}.schema", config_dir())
28}