Add endpoint to create new Collectives
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 70/100
Direzione di ricerca
Esamina gli strumenti esistenti in ex_app/lib/all_tools/collectives.py per vedere lo schema per chiamare gli endpoint OCS di Collectives. Il nuovo strumento create_collective deve effettuare una richiesta POST a /ocs/v2.php/apps/collectives/api/v1.0/collectives con un nome e un emoji opzionale. Controlla la definizione esatta dell'endpoint in appinfo/routes.php dell'app Collectives. Assicurati che lo strumento richieda la conferma dell'utente. Testa eseguendo l'agente e verificando che un nuovo collettivo appaia nell'interfaccia utente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
How to use GitHub
- Please use the 👍 reaction to show that you are interested into the same feature.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Feature request
Which Nextcloud Version are you currently using: 34.0.4 (Context Agent 2.8.0, Collectives 4.6.1)
Is your feature request related to a problem? Please describe.
The Context Agent can't create a new collective, it can only work with the existing ones.
#159 added page tools in ex_app/lib/all_tools/collectives.py (list collectives, and create, edit, move and trash pages), but all of them need an existing collective_id. So a request like "create a collective for project X and add a few pages" can't be done from start to finish. A person has to create the collective in the UI first.
Describe the solution you'd like
Add a create_collective tool to collectives.py that wraps the Collectives OCS endpoint POST /ocs/v2.php/apps/collectives/api/v1.0/collectives (collective#create in the Collectives appinfo/routes.php). It should take a name and an optional emoji, and return the new collective's id.
Because creating a collective also creates a team (circle), the tool should probably be marked as needing user confirmation, like other tools that create shared resources.
Optional, maybe as a follow-up:
- a way to give the collective's team to an existing group or team (e.g. through the existing circles tools), so the result can be shared right away
trash_collective, wrappingDELETE /collectives/{id}, with confirmation
Describe alternatives you've considered
- Creating the collective by hand in the Collectives UI.
- Having the agent write Markdown files into a normal shared folder. The result isn't a collective, so pages, backlinks and the Collectives UI don't apply.
- Creating the collective directly on the filesystem. I tested this:
create_folder("/.Collectives/Test Colectivo Demo")andupload_file(".../Readme.md")both returned{"status":"success"}. But the folder never showed up in.Collectives/, a PROPFIND on it returned404 Not Found, and no new collective appeared in search. So the files tools report success for writes that are silently dropped, and the agent can't tell that nothing was created. That's probably worth a separate bug report.
Additional context
- Related: #159 (Collectives page tools)
- The Collectives create endpoint: https://github.com/nextcloud/collectives/blob/main/appinfo/routes.php
- Lingua principale
- Python
- Stelle
- 24
- Fork
- 16
- Merge medio
- 7g 15h
- PR unite (30g)
- 4
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nextcloud/context_agent
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
nextcloud/context_agent#242 ·
-
find_person_in_contacts fails with Niquests content argument and cannot serialize vCard AddressApertabug
Difficoltà 2/5 Mezza giornata Idoneità per principianti 76/100
nextcloud/context_agent#217 · 3 commenti ·
-
enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
nextcloud/context_agent#241 ·
-
list skills toolApertaenhancement priority normal
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
nextcloud/context_agent#239 · 2 commenti · 1 reazione ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 67/100
nextcloud/context_agent#231 · 2 commenti ·
Tutte le issue di nextcloud/context_agent
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
qgis/QGIS-Plugins-Website#459 ·
-
bug severity:medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
bot-found bug priority: P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
madenvel/KalinkaPlayer#179 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ls1intum/edutelligence#1098 ·
I maintainer di solito rispondono entro 1 giorno