@@ -24,7 +24,8 @@ const DEFAULT_BTSP_PROVIDER_PREFIX: &str = "btsp-provider";
2424/// Checks `BTSP_PROVIDER` env var first, allowing runtime configuration
2525/// of the handshake provider without compile-time primal coupling.
2626fn btsp_provider_prefix ( ) -> String {
27- std:: env:: var ( "BTSP_PROVIDER" ) . unwrap_or_else ( |_| DEFAULT_BTSP_PROVIDER_PREFIX . into ( ) )
27+ crate :: constants:: env_resolution:: btsp_provider ( )
28+ . unwrap_or_else ( || DEFAULT_BTSP_PROVIDER_PREFIX . into ( ) )
2829}
2930
3031/// Pure variant for testing and explicit configuration.
@@ -81,11 +82,11 @@ impl BtspHandshakeConfig {
8182 /// meaning BTSP is required. Returns `None` in development mode.
8283 #[ must_use]
8384 pub fn from_env ( ) -> Option < Self > {
84- let provider_socket_override = std :: env :: var ( "BTSP_PROVIDER_SOCKET" ) . ok ( ) ;
85+ let provider_socket_override = crate :: constants :: env_resolution :: btsp_provider_socket ( ) ;
8586 Self :: from_values (
86- std :: env :: var ( "BIOMEOS_FAMILY_ID" ) . ok ( ) . as_deref ( ) ,
87+ crate :: constants :: env_resolution :: biomeos_family_id ( ) . as_deref ( ) ,
8788 provider_socket_override. as_deref ( ) ,
88- std :: env :: var ( "BIOMEOS_SOCKET_DIR" ) . ok ( ) . as_deref ( ) ,
89+ crate :: constants :: env_resolution :: biomeos_socket_dir ( ) . as_deref ( ) ,
8990 )
9091 }
9192}
@@ -148,7 +149,9 @@ pub(crate) fn provider_socket_name(
148149/// Returns `true` when `BIOMEOS_FAMILY_ID` is set and not `"default"`.
149150#[ must_use]
150151pub fn is_btsp_required ( ) -> bool {
151- is_btsp_required_with ( std:: env:: var ( "BIOMEOS_FAMILY_ID" ) . ok ( ) . as_deref ( ) )
152+ is_btsp_required_with (
153+ crate :: constants:: env_resolution:: biomeos_family_id ( ) . as_deref ( ) ,
154+ )
152155}
153156
154157/// Pure inner function: check BTSP requirement from explicit values.
0 commit comments