bump version

This commit is contained in:
2026-05-24 13:18:50 +02:00
parent 06d7a2fed1
commit d140d94166
8 changed files with 12 additions and 19 deletions
+2 -2
View File
@@ -85,12 +85,12 @@ pub(crate) async fn find_calendars(
.ok_or(NoUserPrincipal)?;
let calendar_home_sets = caldav_client
.request(FindCalendarHomeSet::new(&user_principal.path()))
.request(FindCalendarHomeSet::new(user_principal.path()))
.await?
.home_sets;
Ok(caldav_client
.request(FindCalendars::new(&calendar_home_sets[0].path()))
.request(FindCalendars::new(calendar_home_sets[0].path()))
.await?
.calendars)
}
+2 -5
View File
@@ -10,7 +10,6 @@ use crate::server_handler::{
use http::Uri;
use icalendar::{Event, EventLike, Todo};
use libdav::dav::FoundCollection;
use rmcp::handler::server::tool::ToolRouter;
use rmcp::handler::server::wrapper::Parameters;
use rmcp::model::{CallToolResult, ErrorCode, Implementation, ServerCapabilities, ServerInfo};
use rmcp::schemars::JsonSchema;
@@ -31,7 +30,6 @@ mod todo;
pub(crate) struct CalDavHandler {
client: AuthorizedCaldavClient,
calendar_references: Vec<CalendarReference>,
tool_router: ToolRouter<Self>,
default_calendar_name: String,
}
@@ -95,7 +93,6 @@ impl McpServerHandler for CalDavHandler {
Ok(Self {
client,
calendar_references,
tool_router: Self::tool_router(),
default_calendar_name: default_calendar,
})
}
@@ -209,7 +206,7 @@ impl CalDavHandler {
if let Some(event_component) = component.as_event() {
let event: McpEvent = event_component.clone().try_into()?;
let lower_bound = Local::now().with_timezone(&icalendar::Tz::Local(chrono::Local));
let lower_bound = Local::now().with_timezone(&icalendar::Tz::Local(Local));
let upper_bound = lower_bound + DAYS_DELTA;
let recurrence = event_component.get_recurrence();
@@ -219,7 +216,7 @@ impl CalDavHandler {
for date in recurrence_result.dates {
let mut event_instance = event.clone();
event_instance.start = Some(date.with_timezone(&chrono::Local{}));
event_instance.start = Some(date.with_timezone(&Local{}));
if let Some(start) = event.start && let Some(end) = event.end {
let event_duration = end-start;
+2 -1
View File
@@ -14,7 +14,8 @@ pub struct Config {
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct ServerConfig {
pub path: String,
pub r#type: McpServiceType,
#[serde(rename = "type")]
pub service_type: McpServiceType,
#[serde(rename = "additional-properties", default = "Map::new")]
pub additional_properties: Map<String, toml::Value>,
}
+2 -7
View File
@@ -1,23 +1,18 @@
use crate::server_handler::{McpServerHandler, McpServerHandlerError};
use chrono::{Datelike, Local, Utc};
use rmcp::handler::server::tool::ToolRouter;
use rmcp::model::{Implementation, ServerCapabilities, ServerInfo};
use rmcp::{ServerHandler, tool, tool_handler, tool_router};
use toml::Value;
use toml::map::Map;
#[derive(Debug, Clone)]
pub(crate) struct DateTimeHandler {
tool_router: ToolRouter<Self>,
}
pub(crate) struct DateTimeHandler;
impl McpServerHandler for DateTimeHandler {
async fn new(
_additional_properties: Map<String, Value>,
) -> Result<Self, McpServerHandlerError> {
Ok(DateTimeHandler {
tool_router: Self::tool_router(),
})
Ok(DateTimeHandler {})
}
}
+1 -1
View File
@@ -33,7 +33,7 @@ pub(crate) async fn mcp_router(
let mut router = Router::new();
for config in server_configs {
router = match config.r#type {
router = match config.service_type {
#[cfg(feature = "datetime")]
McpServiceType::DateTime => router.route_service(
config.path.as_str(),