Skip to content

MCP for Cloud 1.4.0

Latest

Choose a tag to compare

@jhowjaw jhowjaw released this 14 Nov 01:23
· 1 commit to main since this release

Minor release on top of 1.3.5. It adds routine reads and writes around the calendar, Talk, notifications, absence, user status, file tags and comments, mail attachments and Deck labels, plus two write routines that combine apps after one confirmation and a read-only meeting preparation. Every new permission is denied by default: an upgrade grants no new access, saved policies, groups and levels keep their effective grants, and a permission missing from a saved policy counts as denied. No database migration; updating from 1.3.5 needs no extra step.

Added

  • New permissions, all denied by default: calendar.availability, activity.read, notifications.read, notifications.dismiss, availability.read, availability.absence, status.read, status.edit, files.tags, files.comments, mail.save, deck.labels, routines.prepare, routines.meeting and routines.mailtask. Sensitive reads (Activity, notifications, absence and user status) start denied like every write. The permissions page keeps its layout; the new permissions are only new rows.
  • Calendar availability: calendar_check_availability checks one 15 to 240 minute window and calendar_suggest_times suggests at most 5 windows, both for up to 20 exact local account IDs and through the local free/busy data only. Suggestions check at most 32 candidates per call over at most 7 days. Busy, missing, external or unknown participants are never reported as free, and no appointment details are returned. Only calendar events count: the working hours configured in Nextcloud are not applied, so a free window can fall outside a person's working hours. Continuing a search is explicit and stateless: the returned continuation is passed back as the next call, never looped automatically. Nothing is reserved, written or sent. Requires calendar.availability.
  • Activity (#38): activity_list_events reads the caller's own Activity feed, newest first, returning at most 50 events after examining at most 500 per call. Only current, authorized Files and simple Calendar references are returned; historical subjects, names and paths are never copied, Deck, task and sharing activities are omitted, and an event with any reference the caller cannot see is omitted without a count. An empty page never proves there was no activity. Requires activity.read.
  • Talk unread: talk_list_unread lists the conversations with unread messages (50 per page) and talk_read_unread reads the messages after the caller's read marker (200 per page). Both are read-only: they never advance the read marker, open a lobby or rename a conversation. A conversation hosted on another server is refused. Uses the existing talk.read.
  • Notifications (#42): notifications_list lists the caller's latest notifications as id, app and time only (50 by default, at most 200), and says when the list is not the whole inbox; it never marks anything read. notifications_dismiss dismisses one own notification after a confirmed plan, through the Notifications app's own dismiss path; a partial or uncertain result is reported and not retried. Requires notifications.read and notifications.dismiss.
  • Out-of-office absence: availability_read_absence reads and availability_set_absence creates or changes the caller's own absence, the same way the absence settings do, including the calendar event and background jobs Nextcloud creates for it. Clearing an absence is not offered: in Nextcloud 34 and 35, AbsenceService::clearAbsence removes the absence dispatcher jobs without naming a user, so clearing one person's absence can remove the scheduled absence jobs of every user. The tool stays out until that is fixed upstream. The native absence settings call the same clearAbsence and have the same upstream limitation. Requires availability.read and availability.absence.
  • User status: status_read_own reads the caller's own configured status (a stored snapshot, not live presence), status_set_type changes the status type and status_set_message sets a custom message, one of the predefined messages with a translated label, or clears it. No custom emoji or icon is accepted or returned. Only the caller's own status can be read or changed. Requires status.read and status.edit.
  • File tags (#39): files_list_tags lists the collaborative tags of one file or folder and files_set_tag assigns or removes one existing tag. Both run through Nextcloud's own DAV server, so the same app plugins and checks as the web interface apply. Exclusion tags are never listed, assigned or removed, and are checked again at the write. Listing uses files.read; changing requires files.tags.
  • File comments (#40): files_read_comments reads the comments of a file or folder without marking them read, and files_add_comment adds one comment as the caller after a confirmed plan. Mentions resolve only accounts the caller can find through people search; a hidden and a missing account get the same refusal, so the answer does not reveal whether an account exists. Comments are never edited or deleted. Reading uses files.read; adding requires files.comments.
  • Save mail attachments to Files (#36): mail_save_attachment saves one attachment, byte for byte, as a new file in Files. It reads the message with BODY.PEEK, so the message stays unread. The size limit is the smaller of the existing file checkout limit and the memory available to PHP; there is no new setting. An occupied name is refused unless replace is passed with the file's ETag; replacing always requires native versioning for the caller and keeps a verified pre-write copy unless the administrator has suspended copies. Requires mail.save and Mail 5.10.11 or later.
  • Deck label management (#37): deck_create_label, deck_update_label and deck_delete_label manage the labels of a board the caller manages, and deck_create_card accepts optional labels (titles or IDs, at most 20) that assigns existing labels and creates missing ones in the same confirmation. Any use of labels requires deck.labels, including existing IDs. Titles that differ only by letter case are refused as duplicates. Deleting a label removes it from every card that carries it, archived and deleted cards included; Deck has no trash for labels, so the plan shows how many cards are affected and a change in between needs a new approval. Thanks to @Roman991 (#37) for the label management code.
  • Meeting routine: routines_create_meeting creates, after one confirmation, a private Talk group room with local participants, posts the agenda as its first message and creates the calendar event with the room link, in that order. It stops at the first step that fails or is uncertain; what was created stays and the receipt lists it. There is no rollback and no retry, so calling again creates another room. External or federated rooms are not supported. Invitations are not sent unless send_invitations is true, and then delivery is not confirmed. It appears only for users with both Talk and Calendar enabled. Requires routines.meeting, plus talk.create, talk.reply and calendar.create.
  • Mail card routine: routines_create_mail_card turns one email into one Deck card after one confirmation: one attachment is saved as a new file in the caller's Files (an occupied name is refused, never overwritten), then a card is created with a private reference to the email and the file. The file is not shared with the board: sharing discloses it to every board member and needs its own decision, so other readers of the board may not be able to open it. The plan names who reads the board, groups and teams by name as current and future members; an audience that cannot be read is treated as shared. The board is read again just before the card is created. If the card fails, the saved file stays. The message is not marked read, forwarded or answered. Requires routines.mailtask, plus mail.messages, mail.save and deck.create.
  • Meeting preparation: routines_prepare_meeting builds a read-only dossier of one event the caller can already see: up to 10 participants, emails from the last 30 days, at most 20 emails, 20 cards and 20 files, searching at most 20 Mail folders with the inbox first. Each source needs its own permission; a source without it is named as missing, without counts. A participant address becomes a local account only with people.read and one exact match. Only links to this instance are followed, each read as a whole token. Cards found by assignment come from the first 20 assignment rows per participant, in no defined order, and the answer states that scope. A Mail folder that fails is skipped and the coverage is marked partial. The dossier is marked as untrusted data written by other people. It is not a complete record of each person. Requires routines.prepare.

Changed

  • Files that a failed write leaves behind: when files_create, the files_checkout upload link or mail_save_attachment fails after the new file was created, the answer now names the empty or incomplete file left at that path and suggests another name or replacing it. Before, the answer looked like a clean refusal and the next attempt failed because the name was taken. If the file became hidden in the meantime, the answer gives only a generic reason, without a path or id. A failure inside the creation itself reports that the file at that name may come from this write or from another client. Nothing is deleted; answers before the file exists and the upload HTTP statuses are unchanged.
  • deck_create_card: new optional labels (with deck.labels) and plan_state arguments.
  • deck_read_card and deck_list_cards: each card now shows its labels (id, title and color, in Deck's order) under deck.read, the same as deck_list_labels. A listing page reads the labels of all its cards in one query.

Fixed

  • Talk reads without writes: talk_list_conversations and talk_read_messages treat a lobby whose timer has passed as open for the answer only, without opening it. talk_list_conversations shows a legacy one-to-one name without storing it, counts unread messages as Talk shows them in its own list, reports 0 for a conversation the lobby bars and null when the count cannot be read.
  • Guests for an account without an email address: calendar_create_event, calendar_update_event and routines_create_meeting now tell the user that their account has no email address, so the event cannot have attendees, instead of a bare "Invalid arguments" (since 1.2.5). The refusal still writes nothing and names nothing of the guests.

Compatibility

  • Nextcloud 34 and 35 only are supported and tested. info.xml still declares Nextcloud 32 to 35, so existing installations are not blocked, and the existing 32/33 code is kept. Nothing new targets 32 or 33, and the CI matrix tests only 34 and 35 (MariaDB on both, plus PostgreSQL and SQLite on 35, each fresh and upgrade).

Validation and limits

Unit and contract tests cover the new tools, their plans, refusals and native call surfaces on the pinned Nextcloud 34 and 35 sources. Integration tests run in the existing NC34/35 CI cells, including a Calendar-only test of the meeting preparation. The mail card routine has no integration test, because no CI cell has Mail and Deck together; each part is covered on its own. No routine promises atomicity, invitation delivery or a complete picture: partial and uncertain results are reported as such.

Community feedback

  • Saving mail attachments to Files was requested by @cfriedrichh in #36.
  • Activity, file comments and notifications follow the requests by @matt-ek in #38, #40 and #42.