4.7 KiB
name, description
| name | description |
|---|---|
| vitruvio-atualizar-manifesto | Use when the user wants to update, rename, or remove an existing artifact registration in vitruvio.json. Triggers: "update the category/description/authMode of", "change the name of", "rename this panel/script/endpoint", "remove this artifact", "unregister", "atualizar manifesto", "mudar categoria", "remover painel", or any request to modify fields of an already-registered artifact. Do NOT trigger for creating new artifacts (use vitruvio-criar-* skills) or adding menu entries (use vitruvio-adicionar-menu). |
Update Vitruvio Manifest Entry
All messages shown to the user must be written in Portuguese.
You are modifying an existing entry in vitruvio.json. No new files — only manifest changes (and optionally file moves/deletions). Follow these steps in order.
Step 1 — Confirm you are inside a Vitruvio repo
ls vitruvio.json 2>/dev/null && echo "OK" || echo "NOT_A_VITRUVIO_REPO"
If NOT_A_VITRUVIO_REPO, stop and tell the user to cd into the correct repo.
Step 2 — Identify operation and target
Ask the user (in a single message, only ask what is missing):
- Operation — one of:
- A — Update fields: change metadata on an existing entry (category, description, authMode, allowedGroups, displayOrder, etc.)
- B — Remove entry: unregister an artifact from
vitruvio.json - C — Rename key: change the artifact's key (breaking change — see Operation C below)
- Target artifact — the key of the artifact to modify, and its section (panel, script, endpoint, query, report, library, process).
Read vitruvio.json and show the user the current entry before proceeding.
Operation A — Update fields
Ask what fields to change and their new values. Then edit vitruvio.json with the updated values, preserving all other fields exactly.
Editable fields by artifact type
Panel: name, description, category, displayOrder, showInPresentation, openInNewWindow, showInMobileList, displayTimeInSeconds, allowedGroups, allowedUsers, forms.mobile, forms.mobileAlternative, defaultState, thumbnail
Script: name, description, domain (USUARIO / SISTEMA)
Endpoint: name, description, authMode (PUBLIC, STATIC_TOKEN, VITRUVIO_WS_USER_AUTH, HTTP_BASIC_AUTH), active
Query: name, connection
Report: name, description, category, owner, orientation, parameterForm, allowedGroups, allowedUsers
Library: name, authMode, mobileEnabled
Process: name, description, forms.mobile, forms.mobileAlternative
After editing, report each field that changed (old value → new value).
Operation B — Remove entry
- Show the full current entry from
vitruvio.jsonto the user. - Ask for explicit confirmation before proceeding — do not remove without a yes.
- Remove the entry from its section array in
vitruvio.json. If the section array becomes empty, remove the array key entirely. - Ask the user: "Do you also want to delete the artifact's files from disk?" — list which files/directories would be deleted. Do not delete anything without an explicit yes.
- If yes, delete the files.
- Report: entry removed from
vitruvio.json; files deleted if confirmed.
Operation C — Rename key
Warning to show the user before proceeding: Renaming a key is a breaking change. Any code that references the old key —
engine.showPanel('<old-key>'),libService.loadScript('<old-key>'), menu entries, process variables, external integrations — will break. Search the repo for the old key before confirming.
- Show the warning above and ask the user to confirm they understand.
- Ask for the new key (kebab-case). Check it is not already used in the same section of
vitruvio.json. - Update the
keyfield invitruvio.json. - Update any
source,bpmn,template,parameterForm,files, orforms.*paths inside the same entry that include the old key in their path. - Rename the artifact's directory or file on disk:
panels/<old-key>/→panels/<new-key>/scripts/<old-key>.js→scripts/<new-key>.jsendpoints/<old-key>.js→endpoints/<new-key>.jsqueries/<old-key>.sql→queries/<new-key>.sqlreports/<old-key>/→reports/<new-key>/libraries/<old-key>/→libraries/<new-key>/processes/<old-key>/→processes/<new-key>/
- Check if a menu entry references the old key (
panelKey,reportKey,processKey) and update it too. - Report: what was renamed in
vitruvio.jsonand on disk. Remind the user to search the codebase for any remaining hardcoded references to the old key:
grep -r "<old-key>" --include="*.xml" --include="*.js" --include="*.json" .