feat(v3.13.0): settings live DB reads, remove Directus/Appwrite, admin stats

Settings fixes:
- MAX_SITES_PER_USER, USER_RATE_LIMIT_PER_MIN/HR now read from DB settings
  table (DB > ENV > default), so dashboard/settings changes apply without
  restart. Sync cache refreshed on every save or delete.
- /api/me reports the live DB value for max_sites_per_user.

Admin improvements:
- Admin users bypass per-user rate limiting entirely (role=admin or ADMIN_EMAILS).
- Admin Overview now shows platform stats: registered users, new users (7d),
  total user sites, available tools.

Plugin cleanup:
- Appwrite and Directus plugins removed from the active registry (8 plugins
  now: WordPress, WooCommerce, WordPress Specialist, Gitea, n8n, Supabase,
  OpenPanel, Coolify). Plugin code is retained for future re-enabling.
- Settings page plugin visibility list updated to match.

Mobile onboarding:
- Stepper steps on narrow viewports stack vertically with correct full border
  and rounded corners on each step.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-20 23:33:20 +02:00
parent f203ca88de
commit 43fd2201a0
223 changed files with 36183 additions and 4115 deletions

View File

@@ -56,7 +56,7 @@ class UserKeyManager:
self,
user_id: str,
name: str,
scopes: str = "read write admin",
scopes: str = "read editor settings install write admin",
expires_in_days: int | None = None,
site_id: str | None = None,
) -> dict[str, Any]:
@@ -65,7 +65,14 @@ class UserKeyManager:
Args:
user_id: Owner's UUID.
name: Human label (e.g. "Claude Desktop").
scopes: Access scopes (default: "read write admin" for full access).
scopes: Access scopes. Default enumerates every tier explicitly
(read / editor / settings / install / write / admin) so the
key matches the per-site Tool Access dropdown 1:1, even if
``UNIVERSAL_SCOPE_TIERS`` is reorganised in a later phase.
The binding access filter for any tool call is the
**intersection** of these scopes with the per-site
``tool_scope`` preset — narrowing happens per-site, not
per-key, so a single key works for every site the user owns.
expires_in_days: Optional expiry in days from now. None = never.
site_id: Optional site UUID to scope key to a single site.