Loosen plugin id rule (todo §2); allow digits and dashes anywhere (^[a-z0-9-]+$)

This commit is contained in:
2026-06-16 11:53:14 +02:00
parent 1623a81ddc
commit 09d616ddd3
4 changed files with 12 additions and 10 deletions

View File

@@ -33,8 +33,8 @@ plugins/scheduling/ # folder name = the plugin id → mounted at /schedulin
**Identity comes from the folder.** The folder name *is* the plugin `id`, and the mount path is
`/<id>` — neither is written in the manifest, so they can't drift or be claimed twice. The id
must be **kebab-case** (`isValidPluginId`: lowercase letters in dash-separated segments — no
digits, uppercase, or leading/trailing/double dashes); the host rejects a malformed folder name
must be **URL/path-safe** (`isValidPluginId`: lowercase `az`, digits, and dashes — dashes
anywhere; no uppercase, underscores, dots, or slashes); the host rejects a malformed folder name
at discovery. The id also namespaces the plugin's `views/`, its `/public/<id>/` assets, and (by
convention) its nav/permission tokens.