@miguelarios/cal-mcp 0.21.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0 (2026-10-18)
4
+
5
+ First stable release. The public contract, and what a minor or patch may change from here, is in [`docs/versioning.md`](../../docs/versioning.md).
6
+
7
+ - **Breaking: requires Node.js 22.12.0 or newer** (was 20.19.0). Node 20 reached end of life in April 2026, and raising the floor after 1.0 would need a major release (#150).
8
+ - **Breaking: errors use pim-core's `ErrorCode` values**, the same vocabulary as card-mcp and email-mcp (#150). The `message` and `retryable` fields are unchanged.
9
+
10
+ | Was | Now |
11
+ |---|---|
12
+ | `validation_error` | `VALIDATION_FAILED`, or `INVALID_ICS` when `import_ics` content does not parse or has no events |
13
+ | `not_found` | `CALENDAR_NOT_FOUND` or `EVENT_NOT_FOUND` |
14
+ | `backend_error` | `WRITE_FAILED`, `OPERATION_FAILED`, `CONNECTION_FAILED`, `CONNECTION_TIMEOUT`, `AUTH_FAILED` or `INTERNAL_ERROR` |
15
+
16
+ - Caller mistakes that reached the server as `backend_error` are now caught first and reported as such: an unparseable or inverted `start`/`end` on `list_events`, `search_events` and `find_free_slots`, an unparseable date on `create_event` / `create_events_batch` (`VALIDATION_FAILED`), and unparseable `import_ics` content (`INVALID_ICS`).
17
+ - **`delete_event` with `span: "this"` no longer corrupts the series on an unparseable `occurrenceDate`.** It wrote `EXDATE:NaN-aNNaN…` into the event and reported success; it now fails with `VALIDATION_FAILED` before anything is written, as does `update_event` with `span: "this"`.
18
+ - **Breaking: every tool parameter and output field is camelCase**, like card-mcp and email-mcp (#150). Tool names and enum values are unchanged (`list_events`, `span: "this"`, `access: "read-write"`).
19
+
20
+ | Was | Now |
21
+ |---|---|
22
+ | `all_day` | `allDay` |
23
+ | `calendar_id` | `calendarId` |
24
+ | `can_be_published` | `canBePublished` |
25
+ | `can_be_shared` | `canBeShared` |
26
+ | `detail_level` | `detailLevel` |
27
+ | `display_name` | `displayName` |
28
+ | `exclude_calendars` | `excludeCalendars` |
29
+ | `ics_content` | `icsContent` |
30
+ | `ignore_tentative` | `ignoreTentative` |
31
+ | `include_all_day_as_busy` | `includeAllDayAsBusy` |
32
+ | `is_recurring` | `isRecurring` |
33
+ | `last_modified` | `lastModified` |
34
+ | `occurrence_date` | `occurrenceDate` |
35
+ | `preferred_end` | `preferredEnd` |
36
+ | `preferred_start` | `preferredStart` |
37
+ | `read_only` | `readOnly` |
38
+ | `recurrence_rule` | `recurrenceRule` |
39
+ | `target_calendar` | `targetCalendar` |
40
+ | `trigger_human` | `triggerHuman` |
41
+ | `unavailable_providers` | `unavailableProviders` |
42
+ - A CalDAV read's HTTP error is classified by its status rather than by words in the server's reply: a 500 whose page said "connection" was a retryable `CONNECTION_FAILED` (pim-core).
43
+ - Bumped `@miguelarios/pim-core` to `^1.0.0`. cal-mcp needs it: it returns core's renamed `/ics` fields as they are, so with a 0.x core its events would fail validation.
44
+
3
45
  ## 0.21.0 (2026-10-18)
4
46
 
5
47
  - **Calendar sharing** (#47): `get_calendar_sharing` (who a calendar is shared with, at what access, and whether they accepted), `share_calendar` and `unshare_calendar` (both ask for confirmation). Reads CalendarServer sharing (mailbox.org / Open-Xchange, Apple), Nextcloud's ownCloud sharing, or WebDAV resource sharing, and writes in the dialect the server answered with. On Nextcloud the sharee is a principal such as `principals/users/bob`. See `docs/tools/cal-mcp.md`.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Miguel Rios
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -9,7 +9,7 @@ Every tool declares a `title`, all four behaviour annotations, and an `outputSch
9
9
 
10
10
  `delete_event` asks the user to confirm whenever it removes the calendar object — `span: "all"`, and `span: "this"` on a non-recurring event. Excluding one occurrence of a recurring event is recoverable and is not gated. `delete_calendar` always asks, and so does an `update_event` with `span: "future"` that would drop per-occurrence changes. Set `PIM_MCP_CONFIRM=off` to skip confirmation in headless use.
11
11
 
12
- Requires Node.js **20.19.0 or newer**.
12
+ Requires Node.js **22.12.0 or newer**.
13
13
 
14
14
  ## Usage
15
15
 
@@ -53,14 +53,14 @@ docker run -d --name cal-mcp --restart unless-stopped --user node \
53
53
  --env-file cal.env \
54
54
  -e PIM_MCP_TRANSPORT=http -e PIM_MCP_HTTP_HOST=0.0.0.0 \
55
55
  -p 127.0.0.1:3002:3000 -v cal-mcp-home:/home/node \
56
- node:22-alpine npx -y @miguelarios/cal-mcp@0.20.0
56
+ node:22-alpine npx -y @miguelarios/cal-mcp@1.0.0
57
57
  ```
58
58
 
59
59
  See the [Docker guide](https://github.com/miguelarios/pim-agents/blob/main/docs/docker.md) for the env file, stdio use from a desktop client, Docker Compose, and exposing a server safely, and the [README](https://github.com/miguelarios/pim-agents/blob/main/README.md#over-streamable-http) for every HTTP setting.
60
60
 
61
- ## Tools (16)
61
+ ## Tools (19)
62
62
 
63
- See [docs/tools/cal-mcp.md](../../docs/tools/cal-mcp.md) for full parameter and output details.
63
+ See [docs/tools/cal-mcp.md](https://github.com/miguelarios/pim-agents/blob/main/docs/tools/cal-mcp.md) for full parameter and output details.
64
64
 
65
65
  | Tool | Description |
66
66
  |------|-------------|
@@ -80,6 +80,9 @@ See [docs/tools/cal-mcp.md](../../docs/tools/cal-mcp.md) for full parameter and
80
80
  | `create_calendar` | Create a calendar collection |
81
81
  | `update_calendar` | Rename or recolour a calendar |
82
82
  | `delete_calendar` | Delete a calendar and every event in it |
83
+ | `get_calendar_sharing` | Who a calendar is shared with, at what access, and whether they accepted |
84
+ | `share_calendar` | Share a calendar with a person or group, read or read-write |
85
+ | `unshare_calendar` | Stop sharing a calendar with someone |
83
86
 
84
87
  ## License
85
88
 
@@ -4,8 +4,8 @@
4
4
  */
5
5
  import type { FreeBusyPeriod, ParsedAlarm } from "@miguelarios/pim-core/ics";
6
6
  export interface CalendarInfo {
7
- calendar_id: string;
8
- display_name: string;
7
+ calendarId: string;
8
+ displayName: string;
9
9
  color: string | null;
10
10
  description: string | null;
11
11
  /** IANA zone the calendar defaults to (`calendar-timezone`), when the provider reports one. */
@@ -13,28 +13,28 @@ export interface CalendarInfo {
13
13
  /** Sort position among the account's calendars (Apple `calendar-order`), when reported. */
14
14
  order: number | null;
15
15
  source: string;
16
- read_only: boolean;
16
+ readOnly: boolean;
17
17
  url: string;
18
18
  ctag?: string;
19
19
  }
20
20
  /** A calendar collection as the management tools name it. */
21
21
  export interface CalendarCollection {
22
- calendar_id: string;
23
- display_name: string;
22
+ calendarId: string;
23
+ displayName: string;
24
24
  url: string;
25
25
  provider: string;
26
26
  }
27
27
  export interface EventSummary {
28
28
  uid: string;
29
- calendar_id: string;
29
+ calendarId: string;
30
30
  title: string;
31
31
  start: string;
32
32
  end: string;
33
- all_day: boolean;
33
+ allDay: boolean;
34
34
  location: string | null;
35
35
  status: string | null;
36
- is_recurring: boolean;
37
- occurrence_date: string | null;
36
+ isRecurring: boolean;
37
+ occurrenceDate: string | null;
38
38
  }
39
39
  export interface EventFull extends EventSummary {
40
40
  description: string | null;
@@ -51,9 +51,9 @@ export interface EventFull extends EventSummary {
51
51
  name: string | null;
52
52
  email: string;
53
53
  } | null;
54
- recurrence_rule: string | null;
54
+ recurrenceRule: string | null;
55
55
  created: string | null;
56
- last_modified: string | null;
56
+ lastModified: string | null;
57
57
  alarms: ParsedAlarm[];
58
58
  categories: string[];
59
59
  geo: {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/providers/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7E,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,+FAA+F;IAC/F,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,2FAA2F;IAC3F,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,6DAA6D;AAC7D,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MA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  */
57
57
  listReachableCalendars(): Promise<ReachableCalendars>;
58
58
  private listProviderCalendars;
59
- /** The configured provider IDs — the prefix half of every `calendar_id`. */
59
+ /** The configured provider IDs — the prefix half of every `calendarId`. */
60
60
  listProviders(): string[];
61
61
  /**
62
62
  * Picks the account a new calendar is created on.
@@ -68,7 +68,7 @@ export declare class CalDavService implements IcsCalendarBackend {
68
68
  */
69
69
  private resolveProvider;
70
70
  /**
71
- * Resolves a calendar_id to the entry it names, so a caller can say what it
71
+ * Resolves a calendarId to the entry it names, so a caller can say what it
72
72
  * is about to act on rather than echoing back the string it was handed.
73
73
  */
74
74
  findCalendarEntry(calendarId: string): Promise<CalendarCollection>;
@@ -123,7 +123,7 @@ export declare class CalDavService implements IcsCalendarBackend {
123
123
  /**
124
124
  * Updates a calendar's display name, description and/or colour via PROPPATCH.
125
125
  *
126
- * Renaming changes the calendar's identity: `calendar_id` is
126
+ * Renaming changes the calendar's identity: `calendarId` is
127
127
  * `provider/DisplayName`, so the old ID stops resolving and the *new* one
128
128
  * comes back in the result. The collection URL is untouched — display name
129
129
  * and slug are allowed to drift, exactly as in every CalDAV client.
@@ -147,17 +147,17 @@ export declare class CalDavService implements IcsCalendarBackend {
147
147
  * exactly as `list_events` would expand it. That covers a plain rule-generated
148
148
  * occurrence and an override VEVENT alike: the override's fields (moved time,
149
149
  * changed title) come back in place of the master's, which is what a caller
150
- * holding an `occurrence_date` from `list_events` needs (#39).
150
+ * holding an `occurrenceDate` from `list_events` needs (#39).
151
151
  */
152
152
  private readEvent;
153
153
  /**
154
154
  * Expands the series over a two-day window around `occurrenceDate` and keeps
155
- * the instance whose `occurrence_date` is exactly that instant. The expansion
155
+ * the instance whose `occurrenceDate` is exactly that instant. The expansion
156
156
  * filters on the rule-generated slot (the RECURRENCE-ID), not on an
157
157
  * override's own DTSTART, so a moved override is found by its slot like any
158
158
  * other occurrence. The window exists because the range is half-open
159
159
  * `[start, end)`: a zero-width range would exclude the target itself. The
160
- * exact match on `occurrence_date` then keeps the neighbours out.
160
+ * exact match on `occurrenceDate` then keeps the neighbours out.
161
161
  */
162
162
  private pickOccurrence;
163
163
  getEvent(calendarId: string, uid: string, occurrenceDate?: string): Promise<EventFull>;
@@ -1 +1 @@
1
- {"version":3,"file":"CalDavService.d.ts","sourceRoot":"","sources":["../../src/services/CalDavService.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,YAAY,EAWlB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,cAAc,EAMpB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EACV,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,cAAc,EAEd,QAAQ,EACR,kBAAkB,EAEnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,eAAe,EAEpB,KAAK,WAAW,EAIjB,MAAM,cAAc,CAAC;AAStB,YAAY,EACV,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAqC/B;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAiBzE;AAgKD,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CASlF;AAMD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAM,CAAC;AACjG,wBAA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ACb,GAAG,EAAE,MAAM,EACX,eAAe,EAAE,MAAM,EACvB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,QAAQ,EAAE,CAAC;IAyKtB,OAAO,CAAC,WAAW;IA0BnB,OAAO,CAAC,WAAW;CAOpB"}
@@ -406,7 +406,7 @@ export class CalDavService {
406
406
  return true; // Default to writable on error
407
407
  }
408
408
  }
409
- // Returns the CalDAV account username for the given calendar_id. Used by
409
+ // Returns the CalDAV account username for the given calendarId. Used by
410
410
  // the tool layer to populate ORGANIZER on events that include attendees —
411
411
  // without this, strict CalDAV servers reject the PUT with 412 (see
412
412
  // updateEvent and generateEventIcs for context).
@@ -468,14 +468,14 @@ export class CalDavService {
468
468
  const displayName = displayNameOf(cal);
469
469
  const canWrite = await this.fetchPrivileges(client, cal.url);
470
470
  out.push({
471
- calendar_id: `${providerId}/${displayName}`,
472
- display_name: displayName,
471
+ calendarId: `${providerId}/${displayName}`,
472
+ displayName: displayName,
473
473
  color: cal.calendarColor ?? null,
474
474
  description: descriptionOf(cal),
475
475
  timezone: timezoneOf(cal),
476
476
  order: orderOf(cal),
477
477
  source: providerId,
478
- read_only: !canWrite,
478
+ readOnly: !canWrite,
479
479
  url: cal.url,
480
480
  // tsdav parses a bare-integer <getctag> (Nextcloud) as a number. It
481
481
  // is still a valid change marker, so keep it, as the string it is typed as.
@@ -487,7 +487,7 @@ export class CalDavService {
487
487
  }
488
488
  return out;
489
489
  }
490
- /** The configured provider IDs — the prefix half of every `calendar_id`. */
490
+ /** The configured provider IDs — the prefix half of every `calendarId`. */
491
491
  listProviders() {
492
492
  return [...this.accounts.keys()];
493
493
  }
@@ -516,7 +516,7 @@ export class CalDavService {
516
516
  throw new ValidationError(`provider is required when several accounts are configured — choose one of: ${known.join(", ")}`, "provider");
517
517
  }
518
518
  /**
519
- * Resolves a calendar_id to the entry it names, so a caller can say what it
519
+ * Resolves a calendarId to the entry it names, so a caller can say what it
520
520
  * is about to act on rather than echoing back the string it was handed.
521
521
  */
522
522
  async findCalendarEntry(calendarId) {
@@ -525,8 +525,8 @@ export class CalDavService {
525
525
  const client = await this.getClient(account);
526
526
  const calendar = await this.findCalendar(client, calendarName, account.id);
527
527
  return {
528
- calendar_id: calendarId,
529
- display_name: calendarName,
528
+ calendarId: calendarId,
529
+ displayName: calendarName,
530
530
  url: calendar.url,
531
531
  provider: account.id,
532
532
  };
@@ -590,7 +590,7 @@ export class CalDavService {
590
590
  throw new ValidationError("sharee is required", "sharee");
591
591
  const before = await this.getCalendarSharing(calendarId);
592
592
  const protocol = before.protocol;
593
- if (!before.can_be_shared || (protocol !== "calendarserver" && protocol !== "owncloud")) {
593
+ if (!before.canBeShared || (protocol !== "calendarserver" && protocol !== "owncloud")) {
594
594
  throw new ValidationError(`Calendar "${calendarId}" cannot be shared through this server: it reports neither CalendarServer nor Nextcloud sharing`, "calendar");
595
595
  }
596
596
  let body;
@@ -668,11 +668,11 @@ export class CalDavService {
668
668
  */
669
669
  async createCalendar(opts) {
670
670
  const account = this.resolveProvider(opts.provider);
671
- // A calendar with no display name has no addressable calendar_id at all —
671
+ // A calendar with no display name has no addressable calendarId at all —
672
672
  // `provider/` resolves to nothing — so creating one is refused rather than
673
673
  // quietly made unreachable.
674
674
  if (opts.displayName.trim() === "") {
675
- throw new ValidationError("display_name cannot be empty", "display_name");
675
+ throw new ValidationError("displayName cannot be empty", "displayName");
676
676
  }
677
677
  if (opts.slug !== undefined && !/^[a-z0-9][a-z0-9-]{0,62}$/.test(opts.slug)) {
678
678
  throw new ValidationError(`Invalid slug "${opts.slug}" — use lowercase letters, digits and hyphens, starting with a letter or digit`, "slug");
@@ -683,7 +683,7 @@ export class CalDavService {
683
683
  const client = await this.getClient(account);
684
684
  const existing = await this.fetchCalendarsFor(client, account.id);
685
685
  // A second calendar with the same display name on the same provider would
686
- // make its calendar_id ambiguous on *every subsequent call* — the name is
686
+ // make its calendarId ambiguous on *every subsequent call* — the name is
687
687
  // not a convenience alias here, it is half the ID, and findCalendar
688
688
  // resolves every event operation by exact display-name match. So duplicates
689
689
  // are refused rather than suffixed; that also keeps a retried create from
@@ -745,8 +745,8 @@ export class CalDavService {
745
745
  // that cache — so drop it or the calendar stays invisible to this process.
746
746
  this.calendarsCache.delete(account.id);
747
747
  return {
748
- calendar_id: `${account.id}/${opts.displayName}`,
749
- display_name: opts.displayName,
748
+ calendarId: `${account.id}/${opts.displayName}`,
749
+ displayName: opts.displayName,
750
750
  url,
751
751
  provider: account.id,
752
752
  };
@@ -754,7 +754,7 @@ export class CalDavService {
754
754
  /**
755
755
  * Updates a calendar's display name, description and/or colour via PROPPATCH.
756
756
  *
757
- * Renaming changes the calendar's identity: `calendar_id` is
757
+ * Renaming changes the calendar's identity: `calendarId` is
758
758
  * `provider/DisplayName`, so the old ID stops resolving and the *new* one
759
759
  * comes back in the result. The collection URL is untouched — display name
760
760
  * and slug are allowed to drift, exactly as in every CalDAV client.
@@ -765,10 +765,10 @@ export class CalDavService {
765
765
  opts.color === undefined &&
766
766
  opts.timezone === undefined &&
767
767
  opts.order === undefined) {
768
- throw new ValidationError("Nothing to change — provide a display_name, color, description, timezone and/or order");
768
+ throw new ValidationError("Nothing to change — provide a displayName, color, description, timezone and/or order");
769
769
  }
770
770
  if (opts.displayName !== undefined && opts.displayName.trim() === "") {
771
- throw new ValidationError("display_name cannot be empty", "display_name");
771
+ throw new ValidationError("displayName cannot be empty", "displayName");
772
772
  }
773
773
  const color = opts.color !== undefined ? normalizeCalendarColor(opts.color) : undefined;
774
774
  const timezone = opts.timezone !== undefined ? normalizeCalendarTimezone(opts.timezone) : undefined;
@@ -777,7 +777,7 @@ export class CalDavService {
777
777
  const client = await this.getClient(account);
778
778
  const calendar = await this.findCalendar(client, calendarName, account.id);
779
779
  const url = calendar.url;
780
- // Renaming onto a name already in use would make that calendar_id ambiguous
780
+ // Renaming onto a name already in use would make that calendarId ambiguous
781
781
  // — the same reason create refuses duplicates. The calendar being renamed is
782
782
  // excluded so re-applying its own name stays a no-op rather than an error.
783
783
  if (opts.displayName !== undefined) {
@@ -823,12 +823,12 @@ export class CalDavService {
823
823
  const newDisplayName = opts.displayName ?? calendarName;
824
824
  const newCalendarId = `${account.id}/${newDisplayName}`;
825
825
  this.calendarsCache.delete(account.id);
826
- // The UID→URL cache is keyed by calendar_id; a rename leaves its entries
826
+ // The UID→URL cache is keyed by calendarId; a rename leaves its entries
827
827
  // valid but filed under a key nothing looks up again.
828
828
  moveCachedCalendar(calendarId, newCalendarId);
829
829
  return {
830
- calendar_id: newCalendarId,
831
- display_name: newDisplayName,
830
+ calendarId: newCalendarId,
831
+ displayName: newDisplayName,
832
832
  url,
833
833
  provider: account.id,
834
834
  };
@@ -852,8 +852,8 @@ export class CalDavService {
852
852
  this.calendarsCache.delete(account.id);
853
853
  purgeCachedCalendar(calendarId);
854
854
  return {
855
- calendar_id: calendarId,
856
- display_name: calendarName,
855
+ calendarId: calendarId,
856
+ displayName: calendarName,
857
857
  url,
858
858
  provider: account.id,
859
859
  };
@@ -893,15 +893,15 @@ export class CalDavService {
893
893
  }
894
894
  summaries.push({
895
895
  uid: event.uid,
896
- calendar_id: calendarId,
896
+ calendarId: calendarId,
897
897
  title: event.title,
898
898
  start: event.start,
899
899
  end: event.end,
900
- all_day: event.all_day,
900
+ allDay: event.allDay,
901
901
  location: event.location,
902
902
  status: event.status,
903
- is_recurring: event.is_recurring,
904
- occurrence_date: event.occurrence_date,
903
+ isRecurring: event.isRecurring,
904
+ occurrenceDate: event.occurrenceDate,
905
905
  });
906
906
  }
907
907
  }
@@ -946,7 +946,7 @@ export class CalDavService {
946
946
  * exactly as `list_events` would expand it. That covers a plain rule-generated
947
947
  * occurrence and an override VEVENT alike: the override's fields (moved time,
948
948
  * changed title) come back in place of the master's, which is what a caller
949
- * holding an `occurrence_date` from `list_events` needs (#39).
949
+ * holding an `occurrenceDate` from `list_events` needs (#39).
950
950
  */
951
951
  async readEvent(calendarId, uid, occurrenceDate) {
952
952
  const { account, calendarName } = this.resolveAccount(calendarId);
@@ -975,29 +975,29 @@ export class CalDavService {
975
975
  }
976
976
  /**
977
977
  * Expands the series over a two-day window around `occurrenceDate` and keeps
978
- * the instance whose `occurrence_date` is exactly that instant. The expansion
978
+ * the instance whose `occurrenceDate` is exactly that instant. The expansion
979
979
  * filters on the rule-generated slot (the RECURRENCE-ID), not on an
980
980
  * override's own DTSTART, so a moved override is found by its slot like any
981
981
  * other occurrence. The window exists because the range is half-open
982
982
  * `[start, end)`: a zero-width range would exclude the target itself. The
983
- * exact match on `occurrence_date` then keeps the neighbours out.
983
+ * exact match on `occurrenceDate` then keeps the neighbours out.
984
984
  */
985
985
  pickOccurrence(data, uid, master, occurrenceDate) {
986
986
  const target = new Date(occurrenceDate).getTime();
987
987
  if (Number.isNaN(target)) {
988
- throw new ValidationError(`Invalid occurrence_date "${occurrenceDate}" — use an ISO 8601 date-time`, "occurrence_date");
988
+ throw new ValidationError(`Invalid occurrenceDate "${occurrenceDate}" — use an ISO 8601 date-time`, "occurrenceDate");
989
989
  }
990
- if (!master.is_recurring) {
991
- throw new ValidationError(`Event "${uid}" is not recurring — omit occurrence_date to read it`, "occurrence_date");
990
+ if (!master.isRecurring) {
991
+ throw new ValidationError(`Event "${uid}" is not recurring — omit occurrenceDate to read it`, "occurrenceDate");
992
992
  }
993
993
  const DAY = 86_400_000;
994
994
  const window = {
995
995
  start: new Date(target - DAY).toISOString(),
996
996
  end: new Date(target + DAY).toISOString(),
997
997
  };
998
- const hit = parseIcsEvents(data, window, this.timezone).find((e) => e.uid === uid && e.occurrence_date !== null && Date.parse(e.occurrence_date) === target);
998
+ const hit = parseIcsEvents(data, window, this.timezone).find((e) => e.uid === uid && e.occurrenceDate !== null && Date.parse(e.occurrenceDate) === target);
999
999
  if (!hit) {
1000
- throw new CalendarError(`Event "${uid}" has no occurrence at ${occurrenceDate} — occurrence_date must be a value list_events returned for it`, ErrorCode.EVENT_NOT_FOUND, uid);
1000
+ throw new CalendarError(`Event "${uid}" has no occurrence at ${occurrenceDate} — occurrenceDate must be a value list_events returned for it`, ErrorCode.EVENT_NOT_FOUND, uid);
1001
1001
  }
1002
1002
  return hit;
1003
1003
  }
@@ -1248,8 +1248,8 @@ export class CalDavService {
1248
1248
  end: event.end,
1249
1249
  status: event.status,
1250
1250
  availability: event.availability,
1251
- all_day: event.all_day,
1252
- calendar_id: calendarId,
1251
+ allDay: event.allDay,
1252
+ calendarId: calendarId,
1253
1253
  });
1254
1254
  }
1255
1255
  }
@@ -1264,7 +1264,7 @@ export class CalDavService {
1264
1264
  /** Which candidates actually block time under the given options. */
1265
1265
  static blocksTime(e, options) {
1266
1266
  // Skip all-day events unless includeAllDayAsBusy
1267
- if (e.all_day && !options.includeAllDayAsBusy)
1267
+ if (e.allDay && !options.includeAllDayAsBusy)
1268
1268
  return false;
1269
1269
  // Skip free events
1270
1270
  if (e.availability === "free")
@@ -1507,23 +1507,23 @@ export class CalDavService {
1507
1507
  toEventFull(event, calendarId) {
1508
1508
  return {
1509
1509
  uid: event.uid,
1510
- calendar_id: calendarId,
1510
+ calendarId: calendarId,
1511
1511
  title: event.title,
1512
1512
  start: event.start,
1513
1513
  end: event.end,
1514
- all_day: event.all_day,
1514
+ allDay: event.allDay,
1515
1515
  location: event.location,
1516
1516
  status: event.status,
1517
- is_recurring: event.is_recurring,
1518
- occurrence_date: event.occurrence_date,
1517
+ isRecurring: event.isRecurring,
1518
+ occurrenceDate: event.occurrenceDate,
1519
1519
  description: event.description,
1520
1520
  url: event.url,
1521
1521
  availability: event.availability,
1522
1522
  attendees: event.attendees,
1523
1523
  organizer: event.organizer,
1524
- recurrence_rule: event.recurrence_rule,
1524
+ recurrenceRule: event.recurrenceRule,
1525
1525
  created: event.created,
1526
- last_modified: event.last_modified,
1526
+ lastModified: event.lastModified,
1527
1527
  alarms: event.alarms,
1528
1528
  categories: event.categories,
1529
1529
  geo: event.geo,