Fix: report calendar available when CalDAV is configured (#76)#77
Merged
MadLlama25 merged 1 commit intoJul 6, 2026
Merged
Conversation
check_function_availability derived calendar availability solely from the JMAP calendar capability. But the calendar tools run over CalDAV, so an account with CalDAV credentials set (FASTMAIL_CALDAV_USERNAME / FASTMAIL_CALDAV_PASSWORD) but without the JMAP calendar scope was told calendar was unavailable even though list_calendars and friends work. Calendar is now reported available when the JMAP calendar capability is present OR CalDAV is configured (initializeCalDAVClient() !== null). The note reflects the active backend, and the enablement guide is shown only when neither path is available (and now mentions the CalDAV option). Closes MadLlama25#76.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
check_function_availabilityreports calendar as unavailable for accounts that have CalDAV configured but lack the JMAPurn:ietf:params:jmap:calendarscapability — even though the calendar tools (list_calendars,list_calendar_events,get_calendar_event,create_calendar_event) run over CalDAV and work fine. Reported in #76.Fix
Calendar availability is now
JMAP calendar capability OR CalDAV configured(initializeCalDAVClient() !== null). Thenotereflects which backend is active (JMAP / CalDAV / neither), and the enablement guide is shown only when neither path is available — now mentioning the CalDAV option as well as the JMAP scope steps.Scope
src/index.ts—check_function_availabilityhandler + tool descriptionREADME.md— tool reference noteNo other behavior changes; no version bump.
Testing
npx tsc --noEmitclean.npm testpasses except for two pre-existing symlink-escape tests that require Windows elevation in my environment (unrelated to this change; they fail identically on a pristinemain).FASTMAIL_CALDAV_USERNAME/FASTMAIL_CALDAV_PASSWORDset and no JMAP calendar scope,check_function_availabilitynow reports calendaravailable: truewith a "Calendar is available via CalDAV" note.Closes #76.