Conversation
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
There was a problem hiding this comment.
Pull request overview
This PR significantly expands the available “all_tools” integrations by adding new tool modules for multiple Nextcloud apps (e.g., Shares, Polls, Photos, Passwords, Notes, News, Music, Forms, Bookmarks, Circles, Cookbook) and extending existing tool sets (Files, Deck, Calendar, Mail).
Changes:
- Add many new tool modules exposing Nextcloud app APIs via
@toolfunctions (safe/dangerous). - Extend existing tools for Files (WebDAV ops + tags), Deck (card operations), Calendar (task operations), and Mail (folder/message helpers).
- Introduce new per-app availability gating via
is_availablefor most new modules.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| ex_app/lib/all_tools/shares.py | New sharing + groups tools (list/create/update/delete shares, group info) |
| ex_app/lib/all_tools/polls.py | New Polls tools (list, details, create/options/votes, close/reopen) |
| ex_app/lib/all_tools/photos.py | New Photos tools (albums CRUD, album membership changes, date search) |
| ex_app/lib/all_tools/passwords.py | New Passwords tools (folders, search/list, CRUD incl. secret retrieval) |
| ex_app/lib/all_tools/notes.py | New Notes tools (list/get/create/update/delete + client-side search) |
| ex_app/lib/all_tools/news.py | New News/RSS tools (feeds/folders/items + mark read/unread) |
| ex_app/lib/all_tools/music.py | New Music tools (library browsing/search + playlist CRUD) |
| ex_app/lib/all_tools/forms.py | New Forms tools (list/details/create/questions/responses/settings) |
| ex_app/lib/all_tools/bookmarks.py | New Bookmarks tools (list/search + bookmark/folder/tag management) |
| ex_app/lib/all_tools/circles.py | New Circles/Teams tools (CRUD circles + membership + share to circle) |
| ex_app/lib/all_tools/cookbook.py | New Cookbook tools (recipes CRUD + categories + search) |
| ex_app/lib/all_tools/files.py | Adds WebDAV file ops + file tagging tools |
| ex_app/lib/all_tools/deck.py | Expands Deck tooling for card lifecycle, labels, assignments, comments |
| ex_app/lib/all_tools/calendar.py | Adds task list/complete/update/delete tools (CalDAV todos) |
| ex_app/lib/all_tools/mail.py | Adds folder listing, message listing/search, move/delete helpers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…_agent into copilot/test-new-tools-in-pr-127
- deck.py: Fix list_boards() returning response.text instead of response.json() - mail.py: Fix wrong docstring on get_mail_account_list(), rewrite list_mail_folders, search_emails, get_email_messages, move_email_to_folder, delete_email to use correct Nextcloud Mail REST API routes instead of nonexistent OCS routes - polls.py: Fix all routes to include correct /api/v1.0/ prefix, fix create_poll payload (API doesn't accept description), fix add_poll_option payload structure, fix vote_on_poll to use correct URL-based answer format - forms.py: Update from nonexistent v2.4 API to correct v3 API, fix create_form to use two-step create+update pattern, fix add_question_to_form payload, fix option creation to use batch optionTexts parameter - files.py: Fix get_folder_tree to use params= instead of json= for GET request Co-authored-by: marcelklehr <986878+marcelklehr@users.noreply.github.com>
Nextcloud's SecurityMiddleware enforces CSRF checks on controller methods without @NoCSRFRequired. ExApps don't have CSRF tokens, but Nextcloud's Request::passesCSRFCheck() bypasses CSRF if the OCS-APIREQUEST header is present (any non-empty value). The nc_py_api library sets this header on the main OCS adapter, but NOT on fresh adapters created via _create_adapter(True) used for REST calls. Added "OCS-APIREQUEST": "true" header to all non-DAV REST API calls in: bookmarks, cookbook, deck, mail, music, news, passwords, photos. DAV calls (files.py, contacts.py, calendar.py) use /remote.php/dav/ which goes through Sabre auth (AppAPIAuthBackend), not the CSRF middleware. OCS calls (forms.py, polls.py, notes.py, circles.py, shares.py) already have CSRF bypass via the OCS adapter's built-in OCS-APIREQUEST header. Co-authored-by: marcelklehr <986878+marcelklehr@users.noreply.github.com>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net> # Conflicts: # ex_app/lib/all_tools/bookmarks.py # ex_app/lib/all_tools/circles.py # ex_app/lib/all_tools/cookbook.py
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
|
@janepie I dropped all changes that didn't work and or I didn't have the motivation to test, everything in here should now work |
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Wdyt about the "list board cards" tool? I occasionally got something like Last time it happened, I just did:
And the "chat with tools" task failed because the request response was |
Can you check if this happens with the main branch as well? |
|
Same with main, it seems i'm consistently getting this error after a fixed number of tool calls. I had the same session multiple times:
And I always got the error for the last message. |
|
Tools in files.py ✔️ I could see the new tools after registering the app again. Sharing ✔️ |
Works for me, it can use the search tool |
Now I have the tools. All good. |
@janepie maybe we can share reviewing and testing these together?
Reviewed and tested works: