mcp_server_collection now also a library

own_assist now bundles the server collection by default
This commit is contained in:
2026-05-14 17:39:10 +02:00
parent 18221b7b56
commit 5f16db06f5
18 changed files with 717 additions and 141 deletions
+3 -2
View File
@@ -1,10 +1,11 @@
[package]
name = "own_assist_common"
version = "0.2.0"
version = "0.3.0"
edition = "2024"
[dependencies]
thiserror = "2.0.18"
toml = "1.1.2"
serde = "1.0.228"
log = "0.4.29"
log = "0.4.29"
tracing-subscriber = "0.3.23"
+1 -1
View File
@@ -2,7 +2,7 @@ use std::fmt::Display;
pub fn exit_with_error_message(error: impl Display, message: impl Display) {
log::error!("{message}: {error}");
eprintln!("{}", message); // makes sure that message is printed even if logging is deactivated
eprintln!("{message}: {error}"); // makes sure that message is printed even if logging is deactivated
std::process::exit(1);
}
+2
View File
@@ -1,5 +1,7 @@
pub mod config_loader;
mod exit_error;
mod tracing_init;
pub use config_loader::config_from_file;
pub use exit_error::exit_with_error_message;
pub use tracing_init::init_tracing_subscriber;
+12
View File
@@ -0,0 +1,12 @@
use tracing_subscriber::layer::SubscriberExt;
use tracing_subscriber::util::SubscriberInitExt;
pub fn init_tracing_subscriber() {
tracing_subscriber::registry()
.with(
tracing_subscriber::EnvFilter::try_from_default_env()
.unwrap_or_else(|_| "info".to_string().into()),
)
.with(tracing_subscriber::fmt::layer())
.init();
}