implement CalDAV MCP server v1 with streamable HTTP tools

This commit is contained in:
2026-03-20 15:47:06 +01:00
parent c92bf5c912
commit 4735b9ccf2
20 changed files with 4505 additions and 2 deletions

14
tests/util.test.ts Normal file
View File

@@ -0,0 +1,14 @@
import { describe, expect, it } from "vitest";
import { normalizeHref } from "../src/util.js";
describe("normalizeHref", () => {
it("resolves relative href against base", () => {
const href = normalizeHref("/caldav/user/Calendar/personal/", "https://caldav.example.com/caldav");
expect(href).toBe("https://caldav.example.com/caldav/user/Calendar/personal/");
});
it("strips URL fragment", () => {
const href = normalizeHref("https://caldav.example.com/caldav/user/Calendar/personal/#fragment", "https://caldav.example.com/caldav");
expect(href).toBe("https://caldav.example.com/caldav/user/Calendar/personal/");
});
});