From 9b85952b5f1c4bcbe985541f9a42f7a8ba57161f Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 00:35:55 -0400 Subject: [PATCH 001/171] Enforce workspace access on every server route Only three routes checked can_access_server; the rest loaded the server by id, so a developer outside a workspace could run cron, write files, install packages or widen agent permissions on its servers, and the list/overview/docker picker showed every server. Every route now resolves through the workspace check, lists filter in SQL, and PUT /servers/ validates allowed_ips like PUT /allowed-ips. A sweep test walks the URL map so a new unguarded route fails CI. --- backend/app/api/fleet.py | 6 +- backend/app/api/fleet_monitor.py | 2 + backend/app/api/proxy.py | 5 +- backend/app/api/servers.py | 95 ++++++++----------- backend/app/api/servers_agents.py | 12 +-- backend/app/api/servers_docker.py | 30 +++++- backend/app/api/servers_remote.py | 37 ++++++++ backend/app/services/remote_docker_service.py | 10 +- .../app/services/server_timeline_service.py | 8 +- backend/app/services/workspace_service.py | 14 +++ backend/tests/test_server_workspace_access.py | 68 +++++++++++++ 11 files changed, 210 insertions(+), 77 deletions(-) diff --git a/backend/app/api/fleet.py b/backend/app/api/fleet.py index f2aa3096..f79a3ddc 100644 --- a/backend/app/api/fleet.py +++ b/backend/app/api/fleet.py @@ -21,8 +21,9 @@ This module is read-only; it does not write any state. from flask import Blueprint, jsonify, request from flask_jwt_extended import jwt_required -from app.models.server import Server from app.services.agent_registry import agent_registry +from app.services.workspace_service import WorkspaceService +from app.middleware.rbac import get_current_user fleet_bp = Blueprint('fleet', __name__) @@ -48,6 +49,7 @@ def list_targets(): feature = (request.args.get('feature') or '').strip() or None targets = [{'kind': 'local'}] + user = get_current_user() # Walk the in-memory registry of connected agents. We intentionally # do NOT pull from the Server table — capabilities are per-session @@ -60,7 +62,7 @@ def list_targets(): # Look up the display name. We could cache this on # ConnectedAgent, but the table is small and the lookup is # cheap; not worth the staleness risk. - server = Server.query.get(server_id) + server = WorkspaceService.get_accessible_server(user, server_id) if not server: # Connected agent without a Server row would be a bug # elsewhere; skip rather than 500. diff --git a/backend/app/api/fleet_monitor.py b/backend/app/api/fleet_monitor.py index 46047c11..8802ba18 100644 --- a/backend/app/api/fleet_monitor.py +++ b/backend/app/api/fleet_monitor.py @@ -12,6 +12,7 @@ from flask_jwt_extended import jwt_required from app.services.fleet_monitor_service import fleet_monitor_service from app.middleware.rbac import admin_required, get_current_user from app.api._request import json_object +from app.api.servers import _get_operable_server fleet_monitor_bp = Blueprint('fleet_monitor', __name__) @@ -128,6 +129,7 @@ def get_anomalies(): @jwt_required() def get_forecast(server_id): """Get capacity forecast for a server.""" + _get_operable_server(server_id) metric = request.args.get('metric', 'disk') return jsonify(fleet_monitor_service.forecast_capacity(server_id, metric)) diff --git a/backend/app/api/proxy.py b/backend/app/api/proxy.py index 7d0e94b1..1fe8e648 100644 --- a/backend/app/api/proxy.py +++ b/backend/app/api/proxy.py @@ -13,7 +13,6 @@ from flask import Blueprint, request, jsonify from flask_jwt_extended import jwt_required -from app.models.server import Server from app.middleware.rbac import developer_required from app.services.proxy_stack_service import ProxyStackService from app.api._request import json_object @@ -23,7 +22,9 @@ proxy_bp = Blueprint('proxy', __name__) def _require_server(server_id): """Return (server, None) or (None, error_response_tuple).""" - server = Server.query.get(server_id) + from app.middleware.rbac import get_current_user + from app.services.workspace_service import WorkspaceService + server = WorkspaceService.get_accessible_server(get_current_user(), server_id) if not server: return None, (jsonify({'error': 'Server not found'}), 404) return server, None diff --git a/backend/app/api/servers.py b/backend/app/api/servers.py index 406be576..a71cab7e 100644 --- a/backend/app/api/servers.py +++ b/backend/app/api/servers.py @@ -98,6 +98,18 @@ def _get_operable_server(server_id): return server +def _ip_pattern_errors(allowed_ips): + """One message per invalid allow-list entry; empty when all are valid.""" + if not isinstance(allowed_ips, list): + return ['allowed_ips must be a list'] + errors = [] + for ip_pattern in allowed_ips: + is_valid, error = validate_ip_pattern(ip_pattern) + if not is_valid: + errors.append(f"Invalid pattern '{ip_pattern}': {error}") + return errors + + def _get_external_base_url(): """Return the public origin agents should use when this app sits behind a proxy.""" public_url = current_app.config.get('PUBLIC_URL') or os.environ.get('SERVERKIT_PUBLIC_URL') @@ -300,6 +312,7 @@ def list_servers(): user, request.headers.get('X-Workspace-Id') or request.args.get('workspace_id')) query = WorkspaceService.scope_query(Server.query, Server, user, workspace_id=ws_id, owner_attr=None) + query = WorkspaceService.filter_accessible_servers(query, user) if group_id: query = query.filter_by(group_id=group_id) @@ -486,9 +499,7 @@ def set_server_workspace(server_id): @jwt_required() def get_server(server_id): """Get a server by ID""" - server = Server.query.get(server_id) - if not server: - raise not_found('server') + server = _get_operable_server(server_id) result = server.to_dict(include_metrics=True) # Surface the live transport so the UI can disable / banner features @@ -581,9 +592,7 @@ def get_server_timeline(server_id): @developer_required def update_server(server_id): """Update a server""" - server = Server.query.get(server_id) - if not server: - raise not_found('server') + server = _get_operable_server(server_id) data = json_object() @@ -598,6 +607,9 @@ def update_server(server_id): if 'permissions' in data: server.permissions = data['permissions'] if 'allowed_ips' in data: + errors = _ip_pattern_errors(data['allowed_ips']) + if errors: + return jsonify({'error': 'Invalid IP patterns', 'details': errors}), 400 server.allowed_ips = data['allowed_ips'] # Handle permission profile @@ -614,9 +626,7 @@ def update_server(server_id): @admin_required def delete_server(server_id): """Delete a server""" - server = Server.query.get(server_id) - if not server: - raise not_found('server') + server = _get_operable_server(server_id) # Disconnect agent if connected if agent_registry.is_agent_connected(server_id): @@ -637,9 +647,7 @@ def start_server_onboarding(server_id): """Begin the onboarding lifecycle for a server (pending -> validating ...).""" from app.services.server_onboarding_service import ServerOnboardingService - server = Server.query.get(server_id) - if not server: - raise not_found('server') + _get_operable_server(server_id) try: status = ServerOnboardingService.start(server_id) @@ -654,9 +662,7 @@ def retry_server_onboarding(server_id): """Clear a failed onboarding and resume from validation.""" from app.services.server_onboarding_service import ServerOnboardingService - server = Server.query.get(server_id) - if not server: - raise not_found('server') + _get_operable_server(server_id) try: status = ServerOnboardingService.retry(server_id) @@ -671,9 +677,7 @@ def get_server_onboarding_status(server_id): """Return the onboarding state + ordered progress log for a server.""" from app.services.server_onboarding_service import ServerOnboardingService - server = Server.query.get(server_id) - if not server: - raise not_found('server') + _get_operable_server(server_id) try: status = ServerOnboardingService.get_status(server_id) @@ -814,9 +818,7 @@ def register_agent(): @jwt_required() def get_server_status(server_id): """Get current server status and live metrics""" - server = Server.query.get(server_id) - if not server: - raise not_found('server') + server = _get_operable_server(server_id) is_connected = agent_registry.is_agent_connected(server_id) @@ -841,9 +843,7 @@ def get_server_status(server_id): @developer_required def ping_server(server_id): """Force a ping/health check on a server""" - server = Server.query.get(server_id) - if not server: - raise not_found('server') + _get_operable_server(server_id) if not agent_registry.is_agent_connected(server_id): raise agent_offline() @@ -864,9 +864,7 @@ def ping_server(server_id): @jwt_required() def get_server_metrics(server_id): """Get historical metrics for a server""" - server = Server.query.get(server_id) - if not server: - raise not_found('server') + _get_operable_server(server_id) # Query parameters from_time = request.args.get('from') @@ -905,9 +903,10 @@ def compare_server_metrics(): if not server_ids or server_ids == ['']: return jsonify({'error': 'Server IDs required'}), 400 + from app.services.workspace_service import WorkspaceService result = {} for server_id in server_ids: - server = Server.query.get(server_id) + server = WorkspaceService.get_accessible_server(get_current_user(), server_id) if not server: continue @@ -936,9 +935,11 @@ def compare_server_metrics(): @jwt_required() def get_servers_overview(): """Get overview of all servers health""" - servers = Server.query.options(joinedload(Server.group)).all() + from app.services.workspace_service import WorkspaceService + servers = WorkspaceService.filter_accessible_servers( + Server.query, get_current_user()).options(joinedload(Server.group)).all() metrics_by_server = latest_metrics_by_server(server.id for server in servers) - connected_ids = set(agent_registry.get_connected_servers()) + connected_ids = set(agent_registry.get_connected_servers()) & {s.id for s in servers} total = len(servers) online = len(connected_ids) @@ -995,9 +996,7 @@ def get_servers_overview(): @jwt_required() def get_command_history(server_id): """Get command history for a server""" - server = Server.query.get(server_id) - if not server: - raise not_found('server') + _get_operable_server(server_id) limit = request.args.get('limit', 50, type=int) @@ -1025,9 +1024,7 @@ def get_permission_profiles(): @jwt_required() def get_allowed_ips(server_id): """Get allowed IPs for a server""" - server = Server.query.get(server_id) - if not server: - raise not_found('server') + server = _get_operable_server(server_id) return jsonify({ 'allowed_ips': server.allowed_ips or [], @@ -1048,20 +1045,12 @@ def update_allowed_ips(server_id): - CIDR: "192.168.1.0/24" - Wildcards: "192.168.1.*" """ - server = Server.query.get(server_id) - if not server: - raise not_found('server') + server = _get_operable_server(server_id) data = json_object() allowed_ips = data.get('allowed_ips', []) - # Validate each IP pattern - errors = [] - for ip_pattern in allowed_ips: - is_valid, error = validate_ip_pattern(ip_pattern) - if not is_valid: - errors.append(f"Invalid pattern '{ip_pattern}': {error}") - + errors = _ip_pattern_errors(allowed_ips) if errors: return jsonify({'error': 'Invalid IP patterns', 'details': errors}), 400 @@ -1078,9 +1067,7 @@ def update_allowed_ips(server_id): @jwt_required() def get_connection_info(server_id): """Get connection info for a server (current IP, connected status, etc.)""" - server = Server.query.get(server_id) - if not server: - raise not_found('server') + server = _get_operable_server(server_id) is_connected = agent_registry.is_agent_connected(server_id) agent = agent_registry.get_agent(server_id) if is_connected else None @@ -1109,9 +1096,7 @@ def rotate_api_key(server_id): This generates new credentials and sends them to the connected agent. The agent must acknowledge the update within 5 minutes. """ - server = Server.query.get(server_id) - if not server: - raise not_found('server') + server = _get_operable_server(server_id) if not agent_registry.is_agent_connected(server_id): raise agent_offline() @@ -1180,9 +1165,7 @@ def rotate_api_key(server_id): @jwt_required() def get_server_security_alerts(server_id): """Get security alerts for a specific server""" - server = Server.query.get(server_id) - if not server: - raise not_found('server') + _get_operable_server(server_id) status = request.args.get('status') severity = request.args.get('severity') @@ -1264,6 +1247,7 @@ def get_server_metrics_history(server_id): Query params: period: '1h', '6h', '24h', '7d', '30d' (default: '24h') """ + _get_operable_server(server_id) period = request.args.get('period', '24h') result = ServerMetricsService.get_server_history(server_id, period) @@ -1279,6 +1263,7 @@ def get_server_metrics_aggregated(server_id): period: '24h', '7d', '30d' (default: '24h') aggregation: 'hourly', 'daily' (default: 'hourly') """ + _get_operable_server(server_id) period = request.args.get('period', '24h') aggregation = request.args.get('aggregation', 'hourly') diff --git a/backend/app/api/servers_agents.py b/backend/app/api/servers_agents.py index bfdce7c3..db47e704 100644 --- a/backend/app/api/servers_agents.py +++ b/backend/app/api/servers_agents.py @@ -7,7 +7,7 @@ import requests from app.models.server import AgentVersion, Server from flask import Response, current_app, jsonify, redirect, request from app.middleware.rbac import admin_required, developer_required -from app.exceptions import agent_offline, field_required, not_found +from app.exceptions import agent_offline, field_required from app.services.agent_registry import agent_registry from datetime import datetime, timedelta from app import db @@ -16,7 +16,7 @@ from app.services.remote_command_dispatcher import dispatch_agent_command from app.services.agent_fleet_service import fleet_service from flask_jwt_extended import get_jwt_identity, jwt_required from app.api._request import json_object -from app.api.servers import _get_external_base_url, servers_bp +from app.api.servers import _get_external_base_url, _get_operable_server, servers_bp # ==================== Installation Scripts ==================== @@ -160,9 +160,7 @@ def get_install_instructions(server_id): Returns installation commands with the correct API endpoint. Registration tokens are only shown when they are generated, so the UI supplies the token. """ - server = Server.query.get(server_id) - if not server: - raise not_found('server') + server = _get_operable_server(server_id) # Check if server has a valid registration token if not server.registration_token_hash: @@ -492,9 +490,7 @@ def trigger_agent_update(server_id): service across the fleet, so it must not be reachable by read-only viewers (every other state-changing server route is already @developer_required). """ - server = Server.query.get(server_id) - if not server: - raise not_found('server') + _get_operable_server(server_id) if not agent_registry.is_agent_connected(server_id): raise agent_offline() diff --git a/backend/app/api/servers_docker.py b/backend/app/api/servers_docker.py index c4cf96eb..a0c15977 100644 --- a/backend/app/api/servers_docker.py +++ b/backend/app/api/servers_docker.py @@ -2,11 +2,11 @@ Registered on the shared ``servers_bp`` blueprint (see app.api.servers).""" from app.services.remote_docker_service import RemoteDockerService -from app.middleware.rbac import developer_required +from app.middleware.rbac import developer_required, get_current_user from app.exceptions import field_required from flask_jwt_extended import get_jwt_identity, jwt_required from flask import jsonify, request -from app.api.servers import _agent_failure_status, servers_bp +from app.api.servers import _agent_failure_status, _get_operable_server, servers_bp from app.api._request import json_object @@ -17,7 +17,7 @@ from app.api._request import json_object @jwt_required() def get_available_servers(): """Get list of servers available for Docker operations""" - servers = RemoteDockerService.get_available_servers() + servers = RemoteDockerService.get_available_servers(get_current_user()) return jsonify(servers) @@ -25,6 +25,7 @@ def get_available_servers(): @jwt_required() def list_remote_containers(server_id): """List containers on a remote server""" + _get_operable_server(server_id) all_containers = request.args.get('all', 'false').lower() == 'true' user_id = get_jwt_identity() @@ -40,6 +41,7 @@ def list_remote_containers(server_id): @jwt_required() def inspect_remote_container(server_id, container_id): """Inspect a container on a remote server""" + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteDockerService.inspect_container(server_id, container_id, user_id=user_id) @@ -54,6 +56,7 @@ def inspect_remote_container(server_id, container_id): @developer_required def start_remote_container(server_id, container_id): """Start a container on a remote server""" + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteDockerService.start_container(server_id, container_id, user_id=user_id) @@ -68,6 +71,7 @@ def start_remote_container(server_id, container_id): @developer_required def stop_remote_container(server_id, container_id): """Stop a container on a remote server""" + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object() timeout = data.get('timeout') @@ -84,6 +88,7 @@ def stop_remote_container(server_id, container_id): @developer_required def restart_remote_container(server_id, container_id): """Restart a container on a remote server""" + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object() timeout = data.get('timeout') @@ -100,6 +105,7 @@ def restart_remote_container(server_id, container_id): @developer_required def remove_remote_container(server_id, container_id): """Remove a container on a remote server""" + _get_operable_server(server_id) user_id = get_jwt_identity() force = request.args.get('force', 'false').lower() == 'true' remove_volumes = request.args.get('v', 'false').lower() == 'true' @@ -120,6 +126,7 @@ def remove_remote_container(server_id, container_id): @jwt_required() def get_remote_container_stats(server_id, container_id): """Get container stats from a remote server""" + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteDockerService.get_container_stats(server_id, container_id, user_id=user_id) @@ -141,6 +148,7 @@ def get_remote_container_logs(server_id, container_id): since: Show logs since timestamp timestamps: Include timestamps (default true) """ + _get_operable_server(server_id) user_id = get_jwt_identity() tail = request.args.get('tail', '100') since = request.args.get('since') @@ -162,6 +170,7 @@ def get_remote_container_logs(server_id, container_id): @jwt_required() def list_remote_images(server_id): """List images on a remote server""" + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteDockerService.list_images(server_id, user_id=user_id) @@ -176,6 +185,7 @@ def list_remote_images(server_id): @developer_required def pull_remote_image(server_id): """Pull an image on a remote server""" + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object() @@ -194,6 +204,7 @@ def pull_remote_image(server_id): @developer_required def remove_remote_image(server_id, image_id): """Remove an image on a remote server""" + _get_operable_server(server_id) user_id = get_jwt_identity() force = request.args.get('force', 'false').lower() == 'true' @@ -209,6 +220,7 @@ def remove_remote_image(server_id, image_id): @jwt_required() def list_remote_volumes(server_id): """List volumes on a remote server""" + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteDockerService.list_volumes(server_id, user_id=user_id) @@ -223,6 +235,7 @@ def list_remote_volumes(server_id): @developer_required def remove_remote_volume(server_id, volume_name): """Remove a volume on a remote server""" + _get_operable_server(server_id) user_id = get_jwt_identity() force = request.args.get('force', 'false').lower() == 'true' @@ -238,6 +251,7 @@ def remove_remote_volume(server_id, volume_name): @jwt_required() def list_remote_networks(server_id): """List networks on a remote server""" + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteDockerService.list_networks(server_id, user_id=user_id) @@ -252,6 +266,7 @@ def list_remote_networks(server_id): @developer_required def remove_remote_network(server_id, network_id): """Remove a network on a remote server""" + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteDockerService.remove_network(server_id, network_id, user_id=user_id) @@ -266,6 +281,7 @@ def remove_remote_network(server_id, network_id): @jwt_required() def get_remote_system_metrics(server_id): """Get system metrics from a remote server""" + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteDockerService.get_system_metrics(server_id, user_id=user_id) @@ -280,6 +296,7 @@ def get_remote_system_metrics(server_id): @jwt_required() def get_remote_system_info(server_id): """Get system info from a remote server""" + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteDockerService.get_system_info(server_id, user_id=user_id) @@ -296,6 +313,7 @@ def get_remote_system_info(server_id): @jwt_required() def list_remote_compose_projects(server_id): """List compose projects on a remote server""" + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteDockerService.compose_list(server_id, user_id=user_id) @@ -310,6 +328,7 @@ def list_remote_compose_projects(server_id): @developer_required def remote_compose_ps(server_id): """List containers for a compose project""" + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object() @@ -332,6 +351,7 @@ def remote_compose_ps(server_id): @developer_required def remote_compose_up(server_id): """Start a compose project""" + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object() @@ -356,6 +376,7 @@ def remote_compose_up(server_id): @developer_required def remote_compose_down(server_id): """Stop a compose project""" + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object() @@ -380,6 +401,7 @@ def remote_compose_down(server_id): @developer_required def remote_compose_logs(server_id): """Get logs from a compose project""" + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object() @@ -404,6 +426,7 @@ def remote_compose_logs(server_id): @developer_required def remote_compose_restart(server_id): """Restart a compose project or specific service""" + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object() @@ -427,6 +450,7 @@ def remote_compose_restart(server_id): @developer_required def remote_compose_pull(server_id): """Pull images for a compose project""" + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object() diff --git a/backend/app/api/servers_remote.py b/backend/app/api/servers_remote.py index 21deee4a..c64ccc46 100644 --- a/backend/app/api/servers_remote.py +++ b/backend/app/api/servers_remote.py @@ -156,6 +156,7 @@ def _agent_result(result, ok_status=200): @servers_bp.route('//cron/status', methods=['GET']) @jwt_required() def remote_cron_status(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteCronService.status(server_id, user_id=user_id) return _agent_result(result) @@ -164,6 +165,7 @@ def remote_cron_status(server_id): @servers_bp.route('//cron/jobs', methods=['GET']) @jwt_required() def remote_cron_list(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteCronService.list_jobs(server_id, user_id=user_id) return _agent_result(result) @@ -172,6 +174,7 @@ def remote_cron_list(server_id): @servers_bp.route('//cron/jobs', methods=['POST']) @developer_required def remote_cron_add(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object(optional=True) schedule = (data.get('schedule') or '').strip() @@ -193,6 +196,7 @@ def remote_cron_add(server_id): @servers_bp.route('//cron/jobs/', methods=['DELETE']) @developer_required def remote_cron_remove(server_id, job_id): + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteCronService.remove_job(server_id, job_id, user_id=user_id) return _agent_result(result) @@ -201,6 +205,7 @@ def remote_cron_remove(server_id, job_id): @servers_bp.route('//cron/jobs//toggle', methods=['POST']) @developer_required def remote_cron_toggle(server_id, job_id): + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object(optional=True) enabled = bool(data.get('enabled', True)) @@ -224,6 +229,7 @@ def remote_cron_toggle(server_id, job_id): @servers_bp.route('//cloudflared/status', methods=['GET']) @jwt_required() def remote_cloudflared_status(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteCloudflaredService.status(server_id, user_id=user_id) return _agent_result(result) @@ -235,6 +241,7 @@ def remote_cloudflared_login(server_id): """Start `cloudflared tunnel login` on the agent. Returns {job_id, channel}; the panel subscribes to the corresponding Socket.IO room and renders the auth_url the agent surfaces.""" + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteCloudflaredService.login(server_id, user_id=user_id) return _agent_result(result) @@ -243,6 +250,7 @@ def remote_cloudflared_login(server_id): @servers_bp.route('//cloudflared/tunnels', methods=['GET']) @jwt_required() def remote_cloudflared_list(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteCloudflaredService.list_tunnels(server_id, user_id=user_id) return _agent_result(result) @@ -251,6 +259,7 @@ def remote_cloudflared_list(server_id): @servers_bp.route('//cloudflared/tunnels', methods=['POST']) @developer_required def remote_cloudflared_create(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object(optional=True) name = (data.get('name') or '').strip() @@ -264,6 +273,7 @@ def remote_cloudflared_create(server_id): @servers_bp.route('//cloudflared/tunnels//route', methods=['POST']) @developer_required def remote_cloudflared_route(server_id, tunnel_ref): + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object(optional=True) hostname = (data.get('hostname') or '').strip() @@ -279,6 +289,7 @@ def remote_cloudflared_route(server_id, tunnel_ref): @servers_bp.route('//cloudflared/tunnels/', methods=['DELETE']) @developer_required def remote_cloudflared_delete(server_id, tunnel_ref): + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteCloudflaredService.delete_tunnel(server_id, tunnel_ref, user_id=user_id) return _agent_result(result) @@ -296,6 +307,7 @@ def remote_cloudflared_delete(server_id, tunnel_ref): @servers_bp.route('//refresh-capabilities', methods=['POST']) @developer_required def remote_refresh_capabilities(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() result = dispatch_agent_command( server_id=server_id, action='agent:recapabilities', @@ -315,6 +327,7 @@ def remote_refresh_capabilities(server_id): @servers_bp.route('//packages', methods=['GET']) @jwt_required() def remote_packages_list(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemotePackagesService.list_installed(server_id, user_id=user_id) return _agent_result(result) @@ -323,6 +336,7 @@ def remote_packages_list(server_id): @servers_bp.route('//packages/search', methods=['GET']) @jwt_required() def remote_packages_search(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() query = (request.args.get('q') or '').strip() if not query: @@ -338,6 +352,7 @@ def remote_packages_search(server_id): @servers_bp.route('//packages/info/', methods=['GET']) @jwt_required() def remote_packages_info(server_id, name): + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemotePackagesService.info(server_id, name, user_id=user_id) return _agent_result(result) @@ -346,6 +361,7 @@ def remote_packages_info(server_id, name): @servers_bp.route('//packages/update-cache', methods=['POST']) @developer_required def remote_packages_update_cache(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemotePackagesService.update_cache(server_id, user_id=user_id) return _agent_result(result) @@ -357,6 +373,7 @@ def remote_packages_install(server_id): """Streaming install. Body: {names: ['nginx', 'redis-server']}. Returns {job_id, channel} immediately; the panel subscribes to the matching Socket.IO room for live install output.""" + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object(optional=True) names = data.get('names') or [] @@ -371,6 +388,7 @@ def remote_packages_install(server_id): @servers_bp.route('//packages/remove', methods=['POST']) @developer_required def remote_packages_remove(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object(optional=True) name = (data.get('name') or '').strip() @@ -385,6 +403,7 @@ def remote_packages_remove(server_id): def remote_packages_upgrade(server_id): """Streaming upgrade. Body: {all: bool, names?: [...]}. Returns {job_id, channel}.""" + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object(optional=True) names = data.get('names') or [] @@ -406,6 +425,7 @@ def remote_packages_upgrade(server_id): @servers_bp.route('//services', methods=['GET']) @jwt_required() def remote_services_list(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() state = request.args.get('state') type_ = request.args.get('type', 'service') @@ -419,6 +439,7 @@ def remote_services_list(server_id): @servers_bp.route('//services/daemon-reload', methods=['POST']) @developer_required def remote_services_daemon_reload(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteSystemdService.daemon_reload(server_id, user_id=user_id) return _agent_result(result) @@ -427,6 +448,7 @@ def remote_services_daemon_reload(server_id): @servers_bp.route('//services//logs', methods=['GET']) @jwt_required() def remote_services_logs(server_id, unit): + _get_operable_server(server_id) user_id = get_jwt_identity() try: lines = int(request.args.get('lines', 200)) @@ -439,6 +461,7 @@ def remote_services_logs(server_id, unit): @servers_bp.route('//services/', methods=['GET']) @jwt_required() def remote_services_status(server_id, unit): + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteSystemdService.status(server_id, unit, user_id=user_id) return _agent_result(result) @@ -447,6 +470,7 @@ def remote_services_status(server_id, unit): @servers_bp.route('//services//', methods=['POST']) @developer_required def remote_services_control(server_id, unit, action): + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteSystemdService.control(server_id, unit, action, user_id=user_id) return _agent_result(result) @@ -462,6 +486,7 @@ def remote_services_control(server_id, unit, action): @servers_bp.route('//runtimes', methods=['GET']) @jwt_required() def remote_runtimes_list(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteRuntimesService.list_state(server_id, user_id=user_id) return _agent_result(result) @@ -470,6 +495,7 @@ def remote_runtimes_list(server_id): @servers_bp.route('//runtimes/pyenv/bootstrap', methods=['POST']) @developer_required def remote_runtimes_pyenv_bootstrap(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteRuntimesService.pyenv_bootstrap(server_id, user_id=user_id) return _agent_result(result) @@ -478,6 +504,7 @@ def remote_runtimes_pyenv_bootstrap(server_id): @servers_bp.route('//runtimes/python', methods=['GET']) @jwt_required() def remote_runtimes_python_installed(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteRuntimesService.python_installed(server_id, user_id=user_id) return _agent_result(result) @@ -486,6 +513,7 @@ def remote_runtimes_python_installed(server_id): @servers_bp.route('//runtimes/python/available', methods=['GET']) @jwt_required() def remote_runtimes_python_available(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteRuntimesService.python_available(server_id, user_id=user_id) return _agent_result(result) @@ -494,6 +522,7 @@ def remote_runtimes_python_available(server_id): @servers_bp.route('//runtimes/python/current', methods=['GET']) @jwt_required() def remote_runtimes_python_current(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() result = RemoteRuntimesService.python_current(server_id, user_id=user_id) return _agent_result(result) @@ -502,6 +531,7 @@ def remote_runtimes_python_current(server_id): @servers_bp.route('//runtimes/python/install', methods=['POST']) @developer_required def remote_runtimes_python_install(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object(optional=True) version = (data.get('version') or '').strip() @@ -514,6 +544,7 @@ def remote_runtimes_python_install(server_id): @servers_bp.route('//runtimes/python/uninstall', methods=['POST']) @developer_required def remote_runtimes_python_uninstall(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object(optional=True) version = (data.get('version') or '').strip() @@ -526,6 +557,7 @@ def remote_runtimes_python_uninstall(server_id): @servers_bp.route('//runtimes/python/global', methods=['POST']) @developer_required def remote_runtimes_python_set_global(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object(optional=True) version = (data.get('version') or '').strip() @@ -538,6 +570,7 @@ def remote_runtimes_python_set_global(server_id): @servers_bp.route('//runtimes/python/local', methods=['POST']) @developer_required def remote_runtimes_python_set_local(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object(optional=True) version = (data.get('version') or '').strip() @@ -562,6 +595,7 @@ def remote_runtimes_python_set_local(server_id): def remote_file_allowed_paths(server_id): """Return the file roots the agent advertised on connect. Lets the file manager seed the browse picker without guessing or hardcoding.""" + _get_operable_server(server_id) paths = RemoteFileService.get_allowed_paths(server_id) return jsonify({'allowed_paths': paths}) @@ -569,6 +603,7 @@ def remote_file_allowed_paths(server_id): @servers_bp.route('//files/browse', methods=['GET']) @jwt_required() def remote_file_browse(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() path = request.args.get('path') if not path: @@ -580,6 +615,7 @@ def remote_file_browse(server_id): @servers_bp.route('//files/read', methods=['GET']) @jwt_required() def remote_file_read(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() path = request.args.get('path') if not path: @@ -591,6 +627,7 @@ def remote_file_read(server_id): @servers_bp.route('//files/write', methods=['POST']) @developer_required def remote_file_write(server_id): + _get_operable_server(server_id) user_id = get_jwt_identity() data = json_object(optional=True) path = (data.get('path') or '').strip() diff --git a/backend/app/services/remote_docker_service.py b/backend/app/services/remote_docker_service.py index 1f846359..47bfc7f8 100644 --- a/backend/app/services/remote_docker_service.py +++ b/backend/app/services/remote_docker_service.py @@ -491,7 +491,7 @@ class RemoteDockerService: # ==================== Utility ==================== @staticmethod - def get_available_servers() -> List[Dict[str, Any]]: + def get_available_servers(user=None) -> List[Dict[str, Any]]: """ Get list of available servers for Docker operations. @@ -510,9 +510,11 @@ class RemoteDockerService: # Get remote servers connected_ids = set(agent_registry.get_connected_servers()) - remote_servers = Server.query.filter( - Server.status.in_(['online', 'connecting']) - ).all() + query = Server.query.filter(Server.status.in_(['online', 'connecting'])) + if user is not None: + from app.services.workspace_service import WorkspaceService + query = WorkspaceService.filter_accessible_servers(query, user) + remote_servers = query.all() for server in remote_servers: has_docker_perm = server.has_permission('docker:container:read') diff --git a/backend/app/services/server_timeline_service.py b/backend/app/services/server_timeline_service.py index 35e100e7..8da66702 100644 --- a/backend/app/services/server_timeline_service.py +++ b/backend/app/services/server_timeline_service.py @@ -214,11 +214,13 @@ def _require_developer(user): raise PermissionDeniedError('Developer access required') -def _resolve_server(server_id): +def _resolve_server(user, server_id): from app.models.server import Server + from app.services.workspace_service import WorkspaceService server = db.session.get(Server, str(server_id)) - if server is None: + # A foreign workspace's server reads as missing, like every server route. + if server is None or not WorkspaceService.can_access_server(user, server): raise ServerTimelineNotFoundError(f'Server {server_id} not found') return server @@ -493,7 +495,7 @@ def _event_sort_key(event): def get_timeline(user, server_id, *, types=None, before=None, limit=None): """Return one authorization-filtered keyset page, newest first.""" _require_developer(user) - server = _resolve_server(server_id) + server = _resolve_server(user, server_id) requested_types = _parse_types(types) page_limit = _parse_limit(limit) cursor = decode_cursor( diff --git a/backend/app/services/workspace_service.py b/backend/app/services/workspace_service.py index 40b7505b..b36f3eed 100644 --- a/backend/app/services/workspace_service.py +++ b/backend/app/services/workspace_service.py @@ -159,6 +159,20 @@ class WorkspaceService: return True return WorkspaceService.get_user_role(server.workspace_id, user.id) is not None + @staticmethod + def filter_accessible_servers(query, user): + """Narrow a Server query to what can_access_server allows, in SQL.""" + if user.is_admin: + return query + from app.models.server import Server + member_ws = db.session.query(WorkspaceMember.workspace_id).filter_by(user_id=user.id) + allowed = [Server.workspace_id.is_(None), Server.workspace_id.in_(member_ws)] + default = Workspace.query.filter_by( + slug=WorkspaceService.DEFAULT_WORKSPACE_SLUG).first() + if default is not None: + allowed.append(Server.workspace_id == default.id) + return query.filter(db.or_(*allowed)) + @staticmethod def get_accessible_server(user, server_id): """The server if *user* may operate it (see can_access_server), else None.""" diff --git a/backend/tests/test_server_workspace_access.py b/backend/tests/test_server_workspace_access.py index 47321365..758b0739 100644 --- a/backend/tests/test_server_workspace_access.py +++ b/backend/tests/test_server_workspace_access.py @@ -1,5 +1,6 @@ """A developer outside a server's workspace must not operate it over REST — the same rule the Socket.IO server rooms and terminal already enforce.""" +import re from unittest.mock import patch import pytest @@ -75,3 +76,70 @@ def test_default_workspace_servers_stay_shared(client, setup): resp = client.post(f'/api/v1/servers/{server.id}/terminal', json={}, headers=headers_for(setup['outsider'])) assert resp.status_code == 200 + + +def _server_id_rules(app): + """Every route that takes a server id, across all blueprints.""" + for rule in app.url_map.iter_rules(): + if '' not in rule.rule or not rule.rule.startswith('/api/v1/'): + continue + for method in sorted(rule.methods - {'HEAD', 'OPTIONS'}): + yield method.lower(), rule.rule + + +def test_every_server_route_refuses_an_outsider(app, client, setup): + """Sweep: no `` route lets a non-member operate or read a + foreign workspace's server. A route that 400s/503s before the check + would show up here as a non-404/403.""" + from app.services.workspace_service import WorkspaceService + leaks = [] + with patch('app.services.remote_command_dispatcher.dispatch_agent_command', + side_effect=AssertionError('agent reached')), \ + patch.object(WorkspaceService, 'can_access_server', + wraps=WorkspaceService.can_access_server) as gate: + for method, rule in _server_id_rules(app): + url = rule.replace('', setup['server']) + url = re.sub(r']+>', '1', url) + url = re.sub(r'<[^>]+>', 'x', url) + gate.reset_mock() + resp = getattr(client, method)(url, json={}, + headers=headers_for(setup['outsider'])) + if resp.status_code not in (401, 403, 404): + leaks.append(f'{method.upper()} {rule} -> {resp.status_code}') + elif resp.status_code == 404 and not gate.called: + leaks.append(f'{method.upper()} {rule} -> 404 without the workspace check') + assert not leaks, '\n'.join(leaks) + + +def test_overview_and_list_hide_foreign_servers(client, setup): + for url in ('/api/v1/servers', '/api/v1/servers/overview'): + body = client.get(url, headers=headers_for(setup['outsider'])).get_json() + rows = body if isinstance(body, list) else body['servers'] + assert setup['server'] not in {r['id'] for r in rows}, url + body = client.get(url, headers=headers_for(setup['member'])).get_json() + rows = body if isinstance(body, list) else body['servers'] + assert setup['server'] in {r['id'] for r in rows}, url + + +def test_update_server_validates_allowed_ips(client, setup): + resp = client.put(f"/api/v1/servers/{setup['server']}", + json={'allowed_ips': ['not-an-ip']}, + headers=headers_for(setup['member'])) + assert resp.status_code == 400 + + +def test_docker_target_picker_hides_foreign_servers(client, setup): + from app import db + from app.models.server import Server + Server.query.get(setup['server']).status = 'online' + db.session.commit() + ids = {s['id'] for s in client.get('/api/v1/servers/available', + headers=headers_for(setup['outsider'])).get_json()} + assert setup['server'] not in ids + + +def test_timeline_hides_foreign_server(client, setup): + resp = client.get(f"/api/v1/servers/{setup['server']}/timeline", + headers=headers_for(setup['outsider'])) + assert resp.status_code == 404 + assert resp.get_json()['code'] == 'server_timeline_server_not_found' From 8ab5ab1bfc3ace7f5b6650b1364015ccf68db14f Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 00:36:57 -0400 Subject: [PATCH 002/171] Stop SSO from auto-creating developer accounts Auto-provision defaulted on with role developer and no domain filter, so enabling GitHub login for yourself let any GitHub user sign up and open remote terminals, while password registration stayed closed. Default to off and viewer; turning it on stays an explicit choice. --- backend/app/services/settings_service.py | 6 +++-- backend/app/services/sso_service.py | 4 +-- backend/tests/test_sso_provisioning.py | 27 +++++++++++++++++++ .../src/components/settings/SSOConfigTab.jsx | 8 +++--- 4 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 backend/tests/test_sso_provisioning.py diff --git a/backend/app/services/settings_service.py b/backend/app/services/settings_service.py index de8e6d11..67749c8a 100644 --- a/backend/app/services/settings_service.py +++ b/backend/app/services/settings_service.py @@ -171,8 +171,10 @@ class SettingsService: 'sso_saml_idp_metadata_url': {'value': '', 'type': 'string', 'description': 'SAML IdP metadata URL'}, 'sso_saml_idp_sso_url': {'value': '', 'type': 'string', 'description': 'SAML IdP SSO URL'}, 'sso_saml_idp_cert': {'value': '', 'type': 'string', 'description': 'SAML IdP certificate (PEM)'}, - 'sso_auto_provision': {'value': True, 'type': 'boolean', 'description': 'Auto-create users on first SSO login'}, - 'sso_default_role': {'value': 'developer', 'type': 'string', 'description': 'Default role for SSO-provisioned users'}, + # Off by default: enabling a provider for yourself must not let every + # account at that provider sign up. Registration is closed by default too. + 'sso_auto_provision': {'value': False, 'type': 'boolean', 'description': 'Auto-create users on first SSO login'}, + 'sso_default_role': {'value': 'viewer', 'type': 'string', 'description': 'Default role for SSO-provisioned users'}, 'sso_force_sso': {'value': False, 'type': 'boolean', 'description': 'Disable password login (SSO only)'}, 'sso_allowed_domains': {'value': [], 'type': 'json', 'description': 'Restrict SSO to these email domains'}, # Source provider connections diff --git a/backend/app/services/sso_service.py b/backend/app/services/sso_service.py index 8a929b36..e8f67276 100644 --- a/backend/app/services/sso_service.py +++ b/backend/app/services/sso_service.py @@ -355,13 +355,13 @@ def find_or_create_user(provider, profile): return user, False # 3. Auto-provision - if not SettingsService.get('sso_auto_provision', True): + if not SettingsService.get('sso_auto_provision', False): raise ValueError('No matching account found and auto-provisioning is disabled') if not email: raise ValueError('SSO provider did not return an email address') - default_role = SettingsService.get('sso_default_role', 'developer') + default_role = SettingsService.get('sso_default_role', 'viewer') username = _generate_username(email, profile.get('display_name', '')) user = User( diff --git a/backend/tests/test_sso_provisioning.py b/backend/tests/test_sso_provisioning.py new file mode 100644 index 00000000..4f822a6a --- /dev/null +++ b/backend/tests/test_sso_provisioning.py @@ -0,0 +1,27 @@ +"""SSO sign-in must not open a door password registration keeps shut.""" +import pytest + +from app.models import User +from app.services import sso_service +from app.services.settings_service import SettingsService + + +def _profile(email, sub='sub-1', **extra): + return {'provider_user_id': sub, 'email': email, 'display_name': 'X', **extra} + + +def test_unknown_account_is_not_provisioned_by_default(app): + with pytest.raises(ValueError, match='auto-provisioning is disabled'): + sso_service.find_or_create_user('github', _profile('stranger@example.com')) + assert User.query.filter_by(email='stranger@example.com').first() is None + + +def test_opted_in_provisioning_defaults_to_viewer(app): + SettingsService.set('sso_auto_provision', True) + try: + user, is_new = sso_service.find_or_create_user( + 'github', _profile('newbie@example.com', sub='sub-2')) + finally: + SettingsService.set('sso_auto_provision', False) + assert is_new + assert user.role == User.ROLE_VIEWER diff --git a/frontend/src/components/settings/SSOConfigTab.jsx b/frontend/src/components/settings/SSOConfigTab.jsx index 2715b687..fee8ea2c 100644 --- a/frontend/src/components/settings/SSOConfigTab.jsx +++ b/frontend/src/components/settings/SSOConfigTab.jsx @@ -54,8 +54,8 @@ const SSOConfigTab = () => { const [expandedProvider, setExpandedProvider] = useState(null); // General settings local state - const [autoProvision, setAutoProvision] = useState(true); - const [defaultRole, setDefaultRole] = useState('developer'); + const [autoProvision, setAutoProvision] = useState(false); + const [defaultRole, setDefaultRole] = useState('viewer'); const [forceSso, setForceSso] = useState(false); const [allowedDomains, setAllowedDomains] = useState(''); @@ -67,8 +67,8 @@ const SSOConfigTab = () => { try { const data = await api.getSSOConfig(); setConfig(data.config || {}); - setAutoProvision(data.config?.sso_auto_provision ?? true); - setDefaultRole(data.config?.sso_default_role || 'developer'); + setAutoProvision(data.config?.sso_auto_provision ?? false); + setDefaultRole(data.config?.sso_default_role || 'viewer'); setForceSso(data.config?.sso_force_sso ?? false); const domains = data.config?.sso_allowed_domains || []; setAllowedDomains(Array.isArray(domains) ? domains.join(', ') : ''); From e1835149a74ef4ed83615b2a6f25856a15ab3844 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 00:37:57 -0400 Subject: [PATCH 003/171] Require a verified email before SSO account linking find_or_create_user attached a new SSO identity to any user with the same email, but Google and generic OIDC profiles never carried email_verified. An IdP account showing an unverified copy of the admin's address signed in as the admin. Carry the claim through and refuse to link without it; GitHub and SAML already vouch. --- backend/app/services/sso_service.py | 18 ++++++++++++++ backend/tests/test_sso_provisioning.py | 33 ++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/backend/app/services/sso_service.py b/backend/app/services/sso_service.py index e8f67276..eb229c56 100644 --- a/backend/app/services/sso_service.py +++ b/backend/app/services/sso_service.py @@ -206,12 +206,19 @@ def handle_oauth_callback(provider, code, state, redirect_uri): return profile +def _claims_verified(info): + """OIDC `email_verified`; some IdPs send it as the string "true".""" + value = info.get('email_verified') + return value is True or (isinstance(value, str) and value.lower() == 'true') + + def _normalize_profile(provider, info, headers=None): """Convert provider-specific userinfo into a standard dict.""" if provider == 'google': return { 'provider_user_id': info.get('sub', ''), 'email': info.get('email', ''), + 'email_verified': _claims_verified(info), 'display_name': info.get('name', ''), } elif provider == 'github': @@ -231,6 +238,9 @@ def _normalize_profile(provider, info, headers=None): return { 'provider_user_id': str(info.get('id', '')), 'email': email, + # GitHub only publishes verified addresses on a profile, and the + # /user/emails fallback above takes a verified primary only. + 'email_verified': bool(email), 'display_name': info.get('name') or info.get('login', ''), } else: @@ -238,6 +248,7 @@ def _normalize_profile(provider, info, headers=None): return { 'provider_user_id': info.get('sub', ''), 'email': info.get('email', ''), + 'email_verified': _claims_verified(info), 'display_name': info.get('name', ''), } @@ -307,6 +318,8 @@ def handle_saml_callback(saml_response_data, request_data): 'provider_user_id': name_id, 'email': attrs.get('email', [name_id])[0] if attrs.get('email') else name_id, 'display_name': attrs.get('displayName', [''])[0] if attrs.get('displayName') else '', + # A signed assertion from the IdP the admin configured vouches for it. + 'email_verified': True, '_tokens': {}, } @@ -351,6 +364,11 @@ def find_or_create_user(provider, profile): if user: if not user.is_active: raise ValueError('Account is deactivated') + # Anyone can put any address on an unverified IdP profile; linking on + # it would hand them the existing account, admin included. + if profile.get('email_verified') is not True: + raise ValueError("This SSO account's email is not verified by the provider; " + 'sign in with your password and link it from your profile') link_identity(user.id, provider, profile, profile.get('_tokens', {})) return user, False diff --git a/backend/tests/test_sso_provisioning.py b/backend/tests/test_sso_provisioning.py index 4f822a6a..669a2423 100644 --- a/backend/tests/test_sso_provisioning.py +++ b/backend/tests/test_sso_provisioning.py @@ -25,3 +25,36 @@ def test_opted_in_provisioning_defaults_to_viewer(app): SettingsService.set('sso_auto_provision', False) assert is_new assert user.role == User.ROLE_VIEWER + + +@pytest.mark.parametrize('provider,info', [ + ('google', {'sub': 'g1', 'email': 'victim@example.com', 'email_verified': False}), + ('oidc', {'sub': 'o1', 'email': 'victim@example.com'}), + ('oidc', {'sub': 'o2', 'email': 'victim@example.com', 'email_verified': 'false'}), +]) +def test_unverified_email_never_links_to_an_existing_account(app, provider, info): + from app import db + from factories import make_user + from app.models.oauth_identity import OAuthIdentity + victim = make_user(db, 'sso_victim_' + info['sub'], 'admin') + victim.email = 'victim@example.com' + db.session.commit() + profile = sso_service._normalize_profile(provider, info) + with pytest.raises(ValueError, match='not verified'): + sso_service.find_or_create_user(provider, profile) + assert OAuthIdentity.query.filter_by(user_id=victim.id).count() == 0 + db.session.delete(victim) + db.session.commit() + + +@pytest.mark.parametrize('verified', [True, 'true']) +def test_verified_email_still_links(app, verified): + from app import db + from factories import make_user + user = make_user(db, 'sso_owner_' + str(verified), 'developer') + user.email = f'owner{verified}@example.com' + db.session.commit() + profile = sso_service._normalize_profile( + 'google', {'sub': f'g-{verified}', 'email': user.email, 'email_verified': verified}) + linked, is_new = sso_service.find_or_create_user('google', profile) + assert linked.id == user.id and not is_new From 84d6cdef4c32df301ac7b1c7476678a2a99a1bec Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 00:39:26 -0400 Subject: [PATCH 004/171] Block file ops on parents of protected roots PROTECTED_ROOTS only matched the path the user typed, so copying /opt copied /opt/serverkit/.env (JWT key, DB creds) somewhere readable, and deleting or moving /opt took the running panel with it. Refuse copy, move, rename and delete when a protected root lies inside the source, and keep symlinks as links when copying a tree. --- backend/app/services/file_service.py | 21 ++++++- backend/tests/test_files_protected_parent.py | 58 ++++++++++++++++++++ 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 backend/tests/test_files_protected_parent.py diff --git a/backend/app/services/file_service.py b/backend/app/services/file_service.py index 74be71cd..6def2293 100644 --- a/backend/app/services/file_service.py +++ b/backend/app/services/file_service.py @@ -147,6 +147,19 @@ class FileService: if not cls.is_path_allowed(path): raise PermissionDeniedError(cls._DENIED) + @classmethod + def _require_no_protected_inside(cls, path: str) -> None: + """Raise when a protected root sits inside *path*. The path checks only + look at the path itself, so copying, moving or deleting a parent such + as /opt would otherwise carry the panel's .env along with it.""" + try: + real_path = os.path.realpath(path) + except (ValueError, OSError): + raise PermissionDeniedError(cls._DENIED) + prefix = real_path.rstrip(os.sep) + os.sep + if any(root.startswith(prefix) for root in cls.PROTECTED_ROOTS): + raise PermissionDeniedError(cls._DENIED) + @classmethod def _require_writable(cls, path: str) -> None: """Raise unless a mutating operation may touch *path*.""" @@ -362,6 +375,7 @@ class FileService: def delete(cls, path: str) -> Dict: """Delete a file or directory.""" cls._require_writable(path) + cls._require_no_protected_inside(path) if not os.path.exists(path): raise NotFoundError('Path not found') @@ -381,6 +395,7 @@ class FileService: def rename(cls, old_path: str, new_name: str) -> Dict: """Rename a file or directory.""" cls._require_writable(old_path) + cls._require_no_protected_inside(old_path) if not os.path.exists(old_path): raise NotFoundError('Path not found') @@ -414,6 +429,7 @@ class FileService: # is written, so it gets the full check. if not cls.is_path_allowed(src_path): raise PermissionDeniedError(cls._DENIED) + cls._require_no_protected_inside(src_path) cls._require_writable(dest_path) if not os.path.exists(src_path): @@ -424,7 +440,9 @@ class FileService: try: if os.path.isdir(src_path): - shutil.copytree(src_path, dest_path) + # Links stay links: following one would copy whatever it + # points at, protected roots included. + shutil.copytree(src_path, dest_path, symlinks=True) else: shutil.copy2(src_path, dest_path) return {'src': src_path, 'dest': dest_path} @@ -439,6 +457,7 @@ class FileService: # A move removes the source, so unlike copy both ends must be writable. for candidate in (src_path, dest_path): cls._require_writable(candidate) + cls._require_no_protected_inside(src_path) if not os.path.exists(src_path): raise NotFoundError('Source not found') diff --git a/backend/tests/test_files_protected_parent.py b/backend/tests/test_files_protected_parent.py new file mode 100644 index 00000000..3d67c056 --- /dev/null +++ b/backend/tests/test_files_protected_parent.py @@ -0,0 +1,58 @@ +"""Copying, moving, renaming or deleting a PARENT of a protected root must not +reach the panel's secrets (GHSA-rm3m-9mvw-68fh, second door): the path checks +only look at the path typed, so `copy /opt -> /home/u/x` used to carry +/opt/serverkit/.env along with it.""" +import os + +import pytest + +from app.exceptions import PermissionDeniedError +from app.services.file_service import FileService + + +@pytest.fixture +def tree(tmp_path, monkeypatch): + opt = tmp_path / 'opt' + panel = opt / 'serverkit' + panel.mkdir(parents=True) + (panel / '.env').write_text('JWT_SECRET_KEY=s3cret\n', encoding='utf-8') + app_dir = opt / 'myapp' + app_dir.mkdir() + (app_dir / 'index.html').write_text('hi', encoding='utf-8') + home = tmp_path / 'home' + home.mkdir() + monkeypatch.setattr(FileService, 'ALLOWED_ROOTS', [str(opt), str(home)]) + monkeypatch.setattr(FileService, 'READ_ONLY_ROOTS', []) + monkeypatch.setattr(FileService, 'PROTECTED_ROOTS', [os.path.realpath(panel)]) + return {'opt': opt, 'panel': panel, 'app': app_dir, 'home': home} + + +def test_copying_a_parent_is_refused(tree): + dest = tree['home'] / 'loot' + with pytest.raises(PermissionDeniedError): + FileService.copy(str(tree['opt']), str(dest)) + assert not dest.exists() + + +def test_moving_renaming_or_deleting_a_parent_is_refused(tree): + with pytest.raises(PermissionDeniedError): + FileService.move(str(tree['opt']), str(tree['home'] / 'moved')) + with pytest.raises(PermissionDeniedError): + FileService.rename(str(tree['opt']), 'renamed') + with pytest.raises(PermissionDeniedError): + FileService.delete(str(tree['opt'])) + assert (tree['panel'] / '.env').exists() + + +def test_siblings_still_work(tree): + FileService.copy(str(tree['app']), str(tree['home'] / 'copy')) + assert (tree['home'] / 'copy' / 'index.html').read_text(encoding='utf-8') == 'hi' + FileService.delete(str(tree['app'])) + assert not tree['app'].exists() + + +@pytest.mark.skipif(os.name == 'nt', reason='symlinks need privileges on Windows') +def test_copied_symlinks_stay_links(tree): + (tree['app'] / 'env').symlink_to(tree['panel'] / '.env') + FileService.copy(str(tree['app']), str(tree['home'] / 'copy')) + assert os.path.islink(tree['home'] / 'copy' / 'env') From 475add2674effa17dbb79a3cfd8e76c2cf3025fd Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 00:43:13 -0400 Subject: [PATCH 005/171] Validate Postgres helper SQL and report user errors pg_create_database/user and pg_grant/revoke built superuser SQL from raw names and passwords, unlike the MySQL helpers beside them. A quote in a password broke CREATE USER, and the create routes ignored that and returned credentials for a user that did not exist. Validate identifiers and privilege lists, escape the password, and surface a failed user as user_error instead of fake credentials. --- backend/app/api/databases.py | 56 ++++++++------------ backend/app/services/database_service.py | 49 ++++++++++++++++- backend/tests/test_pg_helpers_sql.py | 56 ++++++++++++++++++++ frontend/src/components/databases/modals.jsx | 10 +++- frontend/src/i18n/locales/en.json | 1 + frontend/src/i18n/locales/es.json | 3 +- 6 files changed, 139 insertions(+), 36 deletions(-) create mode 100644 backend/tests/test_pg_helpers_sql.py diff --git a/backend/app/api/databases.py b/backend/app/api/databases.py index 86f8b1ca..e34c351e 100644 --- a/backend/app/api/databases.py +++ b/backend/app/api/databases.py @@ -23,6 +23,19 @@ logger = logging.getLogger(__name__) databases_bp = Blueprint('databases', __name__) +def _attach_owner_user(engine, name, data, result): + """Create the database's same-name user; report its credentials only if it + exists, and why not under `user_error` otherwise.""" + password = data.get('user_password') or DatabaseService.generate_password() + created = DatabaseService.create_database_user( + engine, name, password, data.get('host', 'localhost'), data.get('root_password')) + if created.get('success'): + result['user'] = name + result['password'] = password + else: + result['user_error'] = created.get('error') or 'Could not create the database user' + + def _persist_provisioned(engine, name, result, data): """Track a just-provisioned database as a managed resource. Best-effort and additive — a persistence failure never fails the provisioning that succeeded.""" @@ -86,22 +99,7 @@ def create_mysql_database(): if result['success']: # Optionally create user with same name if data.get('create_user'): - password = data.get('user_password') or DatabaseService.generate_password() - DatabaseService.mysql_create_user( - data['name'], - password, - data.get('host', 'localhost'), - data.get('root_password') - ) - DatabaseService.mysql_grant_privileges( - data['name'], - data['name'], - 'ALL', - data.get('host', 'localhost'), - data.get('root_password') - ) - result['user'] = data['name'] - result['password'] = password + _attach_owner_user('mysql', data['name'], data, result) _persist_provisioned('mysql', data['name'], result, data) @@ -192,13 +190,15 @@ def create_mysql_user(): # Grant privileges if database specified if data.get('database'): - DatabaseService.mysql_grant_privileges( + granted = DatabaseService.mysql_grant_privileges( data['username'], data['database'], data.get('privileges', 'ALL'), data.get('host', 'localhost'), data.get('root_password') ) + if not granted.get('success'): + result['grant_error'] = granted.get('error') or 'Could not grant privileges' return jsonify(result), 201 if result['success'] else 400 @@ -292,11 +292,7 @@ def create_pg_database(): if result['success']: # Optionally create user with same name if data.get('create_user'): - password = data.get('user_password') or DatabaseService.generate_password() - DatabaseService.pg_create_user(data['name'], password) - DatabaseService.pg_grant_privileges(data['name'], data['name'], 'ALL') - result['user'] = data['name'] - result['password'] = password + _attach_owner_user('postgresql', data['name'], data, result) _persist_provisioned('postgresql', data['name'], result, data) @@ -368,11 +364,13 @@ def create_pg_user(): # Grant privileges if database specified if data.get('database'): - DatabaseService.pg_grant_privileges( + granted = DatabaseService.pg_grant_privileges( data['username'], data['database'], data.get('privileges', 'ALL') ) + if not granted.get('success'): + result['grant_error'] = granted.get('error') or 'Could not grant privileges' return jsonify(result), 201 if result['success'] else 400 @@ -788,19 +786,11 @@ def create_managed_database(): name, data.get('charset', 'utf8mb4'), data.get('collation', 'utf8mb4_unicode_ci'), data.get('root_password')) if result.get('success') and data.get('create_user'): - password = data.get('user_password') or DatabaseService.generate_password() - DatabaseService.mysql_create_user(name, password, data.get('host', 'localhost'), data.get('root_password')) - DatabaseService.mysql_grant_privileges(name, name, 'ALL', data.get('host', 'localhost'), data.get('root_password')) - result['user'] = name - result['password'] = password + _attach_owner_user('mysql', name, data, result) else: result = DatabaseService.pg_create_database(name, data.get('owner'), data.get('encoding', 'UTF8')) if result.get('success') and data.get('create_user'): - password = data.get('user_password') or DatabaseService.generate_password() - DatabaseService.pg_create_user(name, password) - DatabaseService.pg_grant_privileges(name, name, 'ALL') - result['user'] = name - result['password'] = password + _attach_owner_user('postgresql', name, data, result) if not result.get('success'): return jsonify(result), 400 diff --git a/backend/app/services/database_service.py b/backend/app/services/database_service.py index 80c59daf..715048be 100644 --- a/backend/app/services/database_service.py +++ b/backend/app/services/database_service.py @@ -15,6 +15,16 @@ def _validate_identifier(name: str, max_length: int = 64) -> bool: return bool(re.match(r'^[a-zA-Z0-9_$]{1,}$', name)) and len(name) <= max_length +_INVALID_ID = {'success': False, 'error': 'Invalid identifier: only alphanumeric characters and underscores allowed'} +_INVALID_PRIVILEGES = {'success': False, 'error': 'Invalid privileges: use privilege keywords such as ALL or SELECT, INSERT'} + + +def _validate_privileges(privileges: str) -> bool: + """A comma list of privilege keywords (`ALL`, `SELECT, INSERT`): letters and + spaces only, so it can sit unquoted in GRANT/REVOKE.""" + return bool(re.fullmatch(r'[A-Za-z ]+(,[A-Za-z ]+)*', privileges or '')) + + class DatabaseService: """Service for managing MySQL/MariaDB and PostgreSQL databases. @@ -252,6 +262,8 @@ class DatabaseService: return {'success': False, 'error': 'Invalid identifier: only alphanumeric characters and underscores allowed'} if not _validate_identifier(host): return {'success': False, 'error': 'Invalid host identifier'} + if not _validate_privileges(privileges): + return _INVALID_PRIVILEGES query = f"GRANT {privileges} ON `{database}`.* TO '{username}'@'{host}'; FLUSH PRIVILEGES;" result = DatabaseService.mysql_execute(query, root_password=root_password) return result @@ -265,6 +277,8 @@ class DatabaseService: return {'success': False, 'error': 'Invalid identifier: only alphanumeric characters and underscores allowed'} if not _validate_identifier(host): return {'success': False, 'error': 'Invalid host identifier'} + if not _validate_privileges(privileges): + return _INVALID_PRIVILEGES query = f"REVOKE {privileges} ON `{database}`.* FROM '{username}'@'{host}'; FLUSH PRIVILEGES;" result = DatabaseService.mysql_execute(query, root_password=root_password) return result @@ -448,6 +462,10 @@ class DatabaseService: @staticmethod def pg_create_database(name, owner=None, encoding='UTF8'): """Create a PostgreSQL database.""" + if not _validate_identifier(name) or (owner and not _validate_identifier(owner)): + return _INVALID_ID + if not _validate_identifier(encoding): + return {'success': False, 'error': 'Invalid encoding identifier'} query = f"CREATE DATABASE \"{name}\" ENCODING '{encoding}'" if owner: query += f" OWNER \"{owner}\"" @@ -495,20 +513,30 @@ class DatabaseService: @staticmethod def pg_create_user(username, password): """Create a PostgreSQL user.""" + if not _validate_identifier(username): + return _INVALID_ID + # Standard-conforming strings: doubling the quote is the whole escape. + escaped = password.replace("'", "''") result = DatabaseService.pg_execute( - f"CREATE USER \"{username}\" WITH PASSWORD '{password}';" + f"CREATE USER \"{username}\" WITH PASSWORD '{escaped}';" ) return result @staticmethod def pg_drop_user(username): """Drop a PostgreSQL user.""" + if not _validate_identifier(username): + return _INVALID_ID result = DatabaseService.pg_execute(f'DROP USER IF EXISTS "{username}";') return result @staticmethod def pg_grant_privileges(username, database, privileges='ALL'): """Grant privileges to a PostgreSQL user.""" + if not _validate_identifier(username) or not _validate_identifier(database): + return _INVALID_ID + if not _validate_privileges(privileges): + return _INVALID_PRIVILEGES result = DatabaseService.pg_execute( f'GRANT {privileges} PRIVILEGES ON DATABASE "{database}" TO "{username}";' ) @@ -517,11 +545,30 @@ class DatabaseService: @staticmethod def pg_revoke_privileges(username, database, privileges='ALL'): """Revoke privileges from a PostgreSQL user.""" + if not _validate_identifier(username) or not _validate_identifier(database): + return _INVALID_ID + if not _validate_privileges(privileges): + return _INVALID_PRIVILEGES result = DatabaseService.pg_execute( f'REVOKE {privileges} PRIVILEGES ON DATABASE "{database}" FROM "{username}";' ) return result + @staticmethod + def create_database_user(engine, name, password, host='localhost', root_password=None): + """Create a user named after database *name* with ALL on it. Returns the + first failing step's result, so callers never hand out credentials for + a user that was not created.""" + if engine == 'mysql': + result = DatabaseService.mysql_create_user(name, password, host, root_password) + if result.get('success'): + result = DatabaseService.mysql_grant_privileges(name, name, 'ALL', host, root_password) + else: + result = DatabaseService.pg_create_user(name, password) + if result.get('success'): + result = DatabaseService.pg_grant_privileges(name, name, 'ALL') + return result + @staticmethod def pg_backup(database, output_path=None): """Backup a PostgreSQL database.""" diff --git a/backend/tests/test_pg_helpers_sql.py b/backend/tests/test_pg_helpers_sql.py new file mode 100644 index 00000000..4f2ae40d --- /dev/null +++ b/backend/tests/test_pg_helpers_sql.py @@ -0,0 +1,56 @@ +"""The legacy Postgres helpers run as the postgres superuser, so every value +they put in SQL is validated or escaped like the MySQL ones next to them, and +the create-with-user routes never return credentials for a user that failed.""" +from unittest.mock import patch + +import pytest + +from app.services.database_service import DatabaseService + + +@pytest.fixture +def executed(): + sql = [] + with patch.object(DatabaseService, 'pg_execute', + side_effect=lambda q: sql.append(q) or {'success': True, 'output': ''}): + yield sql + + +def test_password_quote_is_escaped(executed): + assert DatabaseService.pg_create_user('shop', "pa'ss")['success'] + assert executed == ["CREATE USER \"shop\" WITH PASSWORD 'pa''ss';"] + + +@pytest.mark.parametrize('call', [ + lambda: DatabaseService.pg_create_database('x"; DROP DATABASE prod; --'), + lambda: DatabaseService.pg_create_database('shop', owner='a" SUPERUSER'), + lambda: DatabaseService.pg_create_database('shop', encoding="UTF8'; DROP"), + lambda: DatabaseService.pg_create_user('a"b', 'pw'), + lambda: DatabaseService.pg_drop_user('a"b'), + lambda: DatabaseService.pg_grant_privileges('u', 'd', 'ALL ON SCHEMA public TO u; --'), + lambda: DatabaseService.pg_revoke_privileges('u', 'd"x'), + lambda: DatabaseService.mysql_grant_privileges('u', 'd', 'ALL; DROP USER root'), +]) +def test_unsafe_values_never_reach_sql(executed, call): + with patch.object(DatabaseService, 'mysql_execute') as mysql: + assert call()['success'] is False + assert executed == [] + mysql.assert_not_called() + + +def test_privilege_lists_still_work(executed): + assert DatabaseService.pg_grant_privileges('u', 'd', 'SELECT, INSERT')['success'] + assert executed == ['GRANT SELECT, INSERT PRIVILEGES ON DATABASE "d" TO "u";'] + + +def test_failed_user_is_not_reported_with_credentials(app, client, auth_headers): + with patch.object(DatabaseService, 'pg_create_database', return_value={'success': True}), \ + patch.object(DatabaseService, 'pg_create_user', + return_value={'success': False, 'error': 'role exists'}), \ + patch.object(DatabaseService, 'pg_grant_privileges') as grant: + resp = client.post('/api/v1/databases/postgresql', headers=auth_headers, + json={'name': 'pgshop', 'create_user': True}) + body = resp.get_json() + assert 'password' not in body and 'user' not in body + assert body['user_error'] == 'role exists' + grant.assert_not_called() diff --git a/frontend/src/components/databases/modals.jsx b/frontend/src/components/databases/modals.jsx index a9765316..a08066e6 100644 --- a/frontend/src/components/databases/modals.jsx +++ b/frontend/src/components/databases/modals.jsx @@ -9,6 +9,7 @@ import CopyField from '@/components/CopyField'; import { EngineIcon } from '../icons/DatabaseBrands'; import { ENGINE_META } from './dbAdapter'; import { useTranslation } from 'react-i18next'; +import { useToast } from '../../contexts/useToast.js'; // Create / credentials modals for the explorer. Logic is unchanged from the // original Databases page; the explorer wires them to its toolbar and tree. @@ -108,6 +109,7 @@ function EnginePicker({ value, onChange, status, onInstallEngine }) { export function CreateDatabaseModal({ engine: initialEngine = 'mysql', status, onClose, onCreated, onInstallEngine }) { const { t } = useTranslation(); + const toast = useToast(); const fieldId = useId(); const [engine, setEngine] = useState(initialEngine); const [formData, setFormData] = useState({ @@ -149,7 +151,13 @@ export function CreateDatabaseModal({ engine: initialEngine = 'mysql', status, o if (result.success) { if (result.password) setCreatedInfo({ database: formData.name, user: result.user, password: result.password }); - else { onCreated(); onClose(); } + else { + if (result.user_error) { + toast.error(t('app.modals.databaseUserNotCreated', 'Database created, but its user was not: {{error}}', { error: result.user_error })); + } + onCreated(); + onClose(); + } } } catch (err) { setError(err.message || 'Failed to create database'); diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index a76f0a17..23a8d25e 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -3821,6 +3821,7 @@ "creating": "Creating…", "databaseCreated": "Database created", "databaseName": "Database name *", + "databaseUserNotCreated": "Database created, but its user was not: {{error}}", "encoding": "Encoding", "engine": "Engine", "fromTheTemplateCatalog": "from the template catalog", diff --git a/frontend/src/i18n/locales/es.json b/frontend/src/i18n/locales/es.json index b2b09252..9165f108 100644 --- a/frontend/src/i18n/locales/es.json +++ b/frontend/src/i18n/locales/es.json @@ -3836,7 +3836,8 @@ "running": "en ejecución", "saveTheseCredentialsThePasswordWon": "Guarda estas credenciales: la contraseña no se volverá a mostrar.", "userCreated": "Usuario creado", - "username": "Nombre de usuario *" + "username": "Nombre de usuario *", + "databaseUserNotCreated": "Base de datos creada, pero su usuario no: {{error}}" }, "modeToggle": { "assistant": "Asistente", From f724cf0067def25859bd05ed6c592d4e2d3e6eb0 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 00:44:28 -0400 Subject: [PATCH 006/171] Keep live sockets alive past access-token expiry Every emit re-validated the socket's saved JWT including exp, and access tokens last 15 minutes, so metrics, terminals, logs and notifications were cut a quarter-hour after connecting; clients do not reconnect after a server-side disconnect. Re-checks now skip exp only; revocation, auth_version and deactivation still end the socket, and connecting still needs an unexpired token. --- backend/app/middleware/session_auth.py | 11 +++-- backend/app/sockets.py | 4 +- backend/tests/test_socket_session_lifetime.py | 49 +++++++++++++++++++ 3 files changed, 60 insertions(+), 4 deletions(-) create mode 100644 backend/tests/test_socket_session_lifetime.py diff --git a/backend/app/middleware/session_auth.py b/backend/app/middleware/session_auth.py index f806a5b2..92c32523 100644 --- a/backend/app/middleware/session_auth.py +++ b/backend/app/middleware/session_auth.py @@ -15,8 +15,13 @@ def issue_session_tokens(user_id): create_refresh_token(identity=user_id, additional_claims=claims)) -def validate_session_claims(claims, *, allow_pending=False, token_type='access'): - """Return the live user only for an unexpired, unrevoked session JWT.""" +def validate_session_claims(claims, *, allow_pending=False, token_type='access', + check_expiry=True): + """Return the live user only for an unexpired, unrevoked session JWT. + + check_expiry=False is for re-checking an already-authenticated live + connection: its token was unexpired at connect, and revocation, the + auth_version bump and deactivation still end it.""" from app.models import User, RevokedSession if not isinstance(claims, dict) or claims.get('type') != token_type: @@ -29,7 +34,7 @@ def validate_session_claims(claims, *, allow_pending=False, token_type='access') if RevokedSession.query.filter_by(session_id=session_id).first() is not None: return None expiration = claims.get('exp') - if not isinstance(expiration, (int, float)) or expiration <= time.time(): + if not isinstance(expiration, (int, float)) or (check_expiry and expiration <= time.time()): return None try: user_id = int(claims['sub']) diff --git a/backend/app/sockets.py b/backend/app/sockets.py index 1b114198..20d5a93c 100644 --- a/backend/app/sockets.py +++ b/backend/app/sockets.py @@ -65,7 +65,9 @@ def _client_user(sid): info = connected_clients.get(sid) if not info: return None - user = validate_session_claims(info.get('claims', {})) + # A socket outlives its 15-minute access token; ending it at `exp` froze + # every live view, since clients don't reconnect after a server disconnect. + user = validate_session_claims(info.get('claims', {}), check_expiry=False) # Disconnect on role changes instead of retaining previously joined rooms. if not user or user.role != info['role']: _disconnect_client(sid) diff --git a/backend/tests/test_socket_session_lifetime.py b/backend/tests/test_socket_session_lifetime.py new file mode 100644 index 00000000..1eb066c7 --- /dev/null +++ b/backend/tests/test_socket_session_lifetime.py @@ -0,0 +1,49 @@ +"""A live socket outlives its 15-minute access token. Re-checks on emit end it +for revocation, deactivation or a role change — never for plain expiry, which +froze every live view a quarter-hour after connecting.""" +import time + +import app.sockets as sk +from app import db +from factories import access_token_for, make_user + + +def _connect(user, sid, **claim_overrides): + from flask_jwt_extended import decode_token + claims = {**decode_token(access_token_for(user)), **claim_overrides} + with sk._connected_clients_lock: + sk.connected_clients[sid] = {'user_id': user.id, 'role': user.role, 'claims': claims} + + +def test_expired_token_keeps_a_live_socket(app, monkeypatch): + monkeypatch.setattr(sk, '_disconnect_client', lambda sid: None) + user = make_user(db, role='developer') + _connect(user, 'live-1', exp=int(time.time()) - 60) + try: + assert sk._client_user('live-1').id == user.id + finally: + sk.connected_clients.pop('live-1', None) + + +def test_revoked_session_still_ends_it(app, monkeypatch): + from app.models import RevokedSession + dropped = [] + monkeypatch.setattr(sk, '_disconnect_client', dropped.append) + user = make_user(db, role='developer') + _connect(user, 'live-2', exp=int(time.time()) - 60) + session_id = sk.connected_clients['live-2']['claims']['session_id'] + db.session.add(RevokedSession(session_id=session_id, user_id=user.id)) + db.session.commit() + try: + assert sk._client_user('live-2') is None + assert dropped == ['live-2'] + finally: + sk.connected_clients.pop('live-2', None) + + +def test_connect_still_requires_an_unexpired_token(app): + from flask_jwt_extended import decode_token + from app.middleware.session_auth import validate_session_claims + user = make_user(db, role='developer') + claims = {**decode_token(access_token_for(user)), 'exp': int(time.time()) - 60} + assert validate_session_claims(claims) is None From cb1422f34f258a20a5216be5cebc2a0047ef345d Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 00:46:13 -0400 Subject: [PATCH 007/171] Log out only when the refresh token is rejected Any failed refresh (offline, 5xx, 429) cleared both tokens, and each expired request started its own refresh, so a burst of 401s could trip the refresh rate limit and log the tab out. Page load also wiped tokens on any /auth/me failure. Share one in-flight refresh, end the session only on a 401/422 from /auth/refresh or /auth/me, and let transient failures surface as errors with the tokens intact. --- frontend/src/contexts/AuthContext.jsx | 9 +-- .../services/api/__tests__/refresh.test.mjs | 71 +++++++++++++++++++ frontend/src/services/api/client.js | 45 +++++++----- 3 files changed, 104 insertions(+), 21 deletions(-) create mode 100644 frontend/src/services/api/__tests__/refresh.test.mjs diff --git a/frontend/src/contexts/AuthContext.jsx b/frontend/src/contexts/AuthContext.jsx index 7e71f98e..48b9ca65 100644 --- a/frontend/src/contexts/AuthContext.jsx +++ b/frontend/src/contexts/AuthContext.jsx @@ -47,10 +47,11 @@ export function AuthProvider({ children }) { const data = await api.getCurrentUser(); setUser(data.user); } catch (error) { - if (error.status !== 401) { - console.error('Auth check failed:', error); - } - api.clearTokens(); + // Only a 401 means the session is gone. A restarting backend + // (502, "database is locked") or a dropped connection must not + // delete a refresh token that is still good. + if (error.status === 401) api.clearTokens(); + else console.error('Auth check failed:', error); } } setLoading(false); diff --git a/frontend/src/services/api/__tests__/refresh.test.mjs b/frontend/src/services/api/__tests__/refresh.test.mjs new file mode 100644 index 00000000..898a6dc7 --- /dev/null +++ b/frontend/src/services/api/__tests__/refresh.test.mjs @@ -0,0 +1,71 @@ +import test, { beforeEach } from 'node:test'; +import assert from 'node:assert/strict'; +import ApiClient from '../client.js'; + +// A browser-ish world: localStorage, window events, and a scripted fetch. +const store = new Map(); +globalThis.localStorage = { + getItem: (k) => (store.has(k) ? store.get(k) : null), + setItem: (k, v) => store.set(k, String(v)), + removeItem: (k) => store.delete(k), +}; +const events = []; +globalThis.window ??= globalThis; +globalThis.window.dispatchEvent = (e) => events.push(e.type); + +const json = (status, body) => new Response(JSON.stringify(body), { + status, headers: { 'Content-Type': 'application/json' }, +}); +const accessKey = () => [...store.keys()].find((k) => k.endsWith('access_token')); +const refreshKey = () => [...store.keys()].find((k) => k.endsWith('refresh_token')); + +function client() { + const c = new ApiClient(); + c.setTokens('expired', 'refresh-ok'); + return c; +} + +beforeEach(() => { store.clear(); events.length = 0; }); + +test('parallel expired requests share one refresh', async () => { + const c = client(); + let refreshes = 0; + globalThis.fetch = async (url, init) => { + if (url.endsWith('/auth/refresh')) { + refreshes += 1; + await new Promise((r) => setTimeout(r, 10)); + return json(200, { access_token: 'fresh' }); + } + return init.headers.Authorization === 'Bearer fresh' + ? json(200, { ok: true }) + : json(401, { msg: 'Token has expired' }); + }; + const results = await Promise.all([1, 2, 3].map((n) => c._request(`/things/${n}`))); + assert.deepEqual(results, [{ ok: true }, { ok: true }, { ok: true }]); + assert.equal(refreshes, 1); +}); + +for (const failure of ['offline', 500, 429]) { + test(`a transient refresh failure (${failure}) keeps the session`, async () => { + const c = client(); + globalThis.fetch = async (url) => { + if (!url.endsWith('/auth/refresh')) return json(401, { msg: 'Token has expired' }); + if (failure === 'offline') throw new TypeError('Failed to fetch'); + return json(failure, { error: 'busy' }); + }; + await assert.rejects(c._request('/things')); + assert.equal(store.get(refreshKey()), 'refresh-ok'); + assert.deepEqual(events, []); + }); +} + +test('a rejected refresh token ends the session', async () => { + const c = client(); + globalThis.fetch = async (url) => (url.endsWith('/auth/refresh') + ? json(401, { msg: 'Token has been revoked' }) + : json(401, { msg: 'Token has expired' })); + await assert.rejects(c._request('/things'), (err) => err.status === 401); + assert.equal(accessKey(), undefined); + assert.equal(refreshKey(), undefined); + assert.deepEqual(events, ['serverkit:auth-expired']); +}); diff --git a/frontend/src/services/api/client.js b/frontend/src/services/api/client.js index eef60a5c..9b2c0f47 100644 --- a/frontend/src/services/api/client.js +++ b/frontend/src/services/api/client.js @@ -174,6 +174,8 @@ class ApiClient { const isJwtIssue = probe && probe.msg && !probe.error; if (isJwtIssue) { + // Throws on a transient refresh failure (offline, 5xx, 429): + // the refresh token is still good, so the session must survive. const refreshed = await this.refreshToken(); if (refreshed) { config.headers.Authorization = `Bearer ${this.getToken()}`; @@ -223,28 +225,37 @@ class ApiClient { return data; } - async refreshToken() { + // True once a new access token is stored; false only when the server + // rejected the refresh token (401/422), which is the one case that ends the + // session. Anything else throws and leaves the tokens alone. Concurrent + // callers share one in-flight refresh, so a burst of expired requests costs + // one POST /auth/refresh instead of one each (and can't trip its limit). + refreshToken() { + this._refreshing ??= this._refreshOnce().finally(() => { this._refreshing = null; }); + return this._refreshing; + } + + async _refreshOnce() { const refreshToken = localStorage.getItem(storageKey('refresh_token')); if (!refreshToken) return false; - try { - const response = await fetch(`${this.baseUrl}/auth/refresh`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - Authorization: `Bearer ${refreshToken}`, - }, - }); + const response = await fetch(`${this.baseUrl}/auth/refresh`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${refreshToken}`, + }, + }); - if (response.ok) { - const data = await response.json(); - localStorage.setItem(storageKey('access_token'), data.access_token); - return true; - } - return false; - } catch { - return false; + if (response.ok) { + const data = await response.json(); + localStorage.setItem(storageKey('access_token'), data.access_token); + return true; } + if (response.status === 401 || response.status === 422) return false; + const err = new Error(`Could not refresh the session (${response.status})`); + err.status = response.status; + throw err; } } From cb93120bac23ce87e31154100944670663607901 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 00:49:57 -0400 Subject: [PATCH 008/171] Keep custom-domain HTTPS across vhost rebuilds Enabling SSL on a custom domain edited the vhost in place, but every later rewrite (deploy, slot switch, domain attach, drift repair, restore) rebuilt it from Domain rows that only knew wildcard certs, so HTTPS silently disappeared while the row still said enabled. Rebuilds now resolve each domain's own cert and render one server set per certificate when domains differ. Enable/attach publish through write_app_vhost and only claim SSL when nginx accepted it, the key path is stored under its real column (legacy rows fall back to certbot's privkey.pem), disable drops the HTTPS block, and a repeat add_ssl_to_site swaps the cert instead of breaking nginx -t. --- backend/app/api/domains.py | 24 ++--- backend/app/services/domain_attach_service.py | 18 ++-- backend/app/services/nginx/rendering.py | 19 ++++ backend/app/services/nginx_service.py | 21 +++- backend/app/services/site_domain_service.py | 47 +++++++-- .../tests/test_custom_domain_ssl_survives.py | 99 +++++++++++++++++++ 6 files changed, 195 insertions(+), 33 deletions(-) create mode 100644 backend/tests/test_custom_domain_ssl_survives.py diff --git a/backend/app/api/domains.py b/backend/app/api/domains.py index c6f141bd..cd1337a7 100644 --- a/backend/app/api/domains.py +++ b/backend/app/api/domains.py @@ -407,19 +407,17 @@ def enable_ssl(domain_id): if not result['success']: return jsonify({'error': result.get('error', 'Failed to obtain certificate')}), 400 - # Add SSL to Nginx site - nginx_result = NginxService.add_ssl_to_site( - app.name, - result['certificate_path'], - result['private_key_path'] - ) - - if not nginx_result['success']: - return jsonify({'error': nginx_result.get('error', 'Failed to configure Nginx')}), 400 - + from app.services.site_domain_service import SiteDomainService + # Record the cert, then regenerate the vhost from the rows — the same + # door every later rewrite uses, so the HTTPS block survives them. domain.ssl_enabled = True domain.ssl_certificate_path = result['certificate_path'] - domain.ssl_private_key_path = result['private_key_path'] + domain.ssl_key_path = result['private_key_path'] + db.session.flush() + published = SiteDomainService.write_app_vhost(app) + if published.get('warning'): + db.session.rollback() + return jsonify({'error': published['warning']}), 400 db.session.commit() # Only after issuance actually worked — remembering an address that @@ -449,10 +447,14 @@ def disable_ssl(domain_id): if not ResourceGrantService.can_edit_app(user, app): raise permission_denied() + from app.services.site_domain_service import SiteDomainService domain.ssl_enabled = False db.session.commit() + # Drop the domain's HTTPS server block; best-effort like other rewrites. + published = SiteDomainService.write_app_vhost(app) return jsonify({ + 'warning': published.get('warning'), 'message': 'SSL disabled for domain', 'domain': domain.to_dict() }), 200 diff --git a/backend/app/services/domain_attach_service.py b/backend/app/services/domain_attach_service.py index 8f170ef5..974c5f6e 100644 --- a/backend/app/services/domain_attach_service.py +++ b/backend/app/services/domain_attach_service.py @@ -125,7 +125,6 @@ class DomainAttachService: if want_ssl: try: from app.services.ssl_service import SSLService, get_acme_contact - from app.services.nginx_service import NginxService # The stored panel contact before the admin@ guess — # that guess is where Let's Encrypt expiry notices went to # die, since the address usually does not exist. @@ -135,13 +134,16 @@ class DomainAttachService: domain.ssl_enabled = True domain.ssl_certificate_path = cert.get('certificate_path') domain.ssl_key_path = cert.get('private_key_path') - ssl_result['enabled'] = True - try: - NginxService.add_ssl_to_site( - app.name, cert.get('certificate_path'), - cert.get('private_key_path')) - except Exception as e: - warnings.append(f'certificate issued but nginx SSL wiring failed: {e}') + db.session.flush() + wired = SiteDomainService.write_app_vhost(app) + if wired.get('warning'): + # Keep the cert paths for a retry, but don't claim + # HTTPS that nginx is not serving. + domain.ssl_enabled = False + warnings.append('certificate issued but nginx SSL wiring ' + f"failed: {wired['warning']}") + else: + ssl_result['enabled'] = True else: err = (cert or {}).get('error') or 'certificate request failed' ssl_result['error'] = err diff --git a/backend/app/services/nginx/rendering.py b/backend/app/services/nginx/rendering.py index 5c131889..1ee01027 100644 --- a/backend/app/services/nginx/rendering.py +++ b/backend/app/services/nginx/rendering.py @@ -39,15 +39,34 @@ def render_site_config(name: str, app_type: str, domains: List[str], micro_cache_ttl: Optional[int] = None, immutable_assets: bool = False, wordpress_protection: bool = False, *, + cert_groups: Optional[List[tuple]] = None, settings: RenderSettings = DEFAULT_SETTINGS) -> Dict: """Render the vhost config for a site to a string — no side effects. This is the exact template pipeline :meth:`create_site` writes to disk; it is exposed separately so callers (e.g. drift detection) can compute the expected on-disk content without touching the filesystem. + + ``cert_groups`` — ``[(domains, cert, key), ...]`` — serves each group of + domains from its own certificate (``cert=None`` for plain HTTP): one + server set per group, since a server block has exactly one certificate. + It replaces ``domains``/``ssl_cert``/``ssl_key``. Templates hold only + ``server`` blocks, so concatenated groups are a valid file. Returns ``{'success': True, 'config': str}`` or ``{'success': False, 'error': msg}``. """ + if cert_groups: + parts = [] + for group_domains, group_cert, group_key in cert_groups: + rendered = render_site_config( + name, app_type, list(group_domains), root_path, port, php_version, + group_cert, group_key, upstream, micro_cache, micro_cache_ttl, + immutable_assets, wordpress_protection, settings=settings) + if not rendered.get('success'): + return rendered + parts.append(rendered['config']) + return {'success': True, 'config': '\n'.join(parts)} + if not domains: return {'success': False, 'error': 'At least one domain is required'} diff --git a/backend/app/services/nginx_service.py b/backend/app/services/nginx_service.py index f0376e43..ac647065 100644 --- a/backend/app/services/nginx_service.py +++ b/backend/app/services/nginx_service.py @@ -240,12 +240,14 @@ class NginxService: micro_cache: bool = False, micro_cache_ttl: Optional[int] = None, immutable_assets: bool = False, - wordpress_protection: bool = False) -> Dict: + wordpress_protection: bool = False, + cert_groups: Optional[List[tuple]] = None) -> Dict: """Compatibility entry point for the pure configuration layer.""" return rendering.render_site_config( name, app_type, domains, root_path, port, php_version, ssl_cert, ssl_key, upstream, micro_cache, micro_cache_ttl, immutable_assets, - wordpress_protection, settings=cls._render_settings()) + wordpress_protection, cert_groups=cert_groups, + settings=cls._render_settings()) @classmethod def _with_wordpress_protection(cls, config: str, port: int) -> str: @@ -457,7 +459,8 @@ class NginxService: upstream: str = None, micro_cache: bool = False, micro_cache_ttl: Optional[int] = None, immutable_assets: bool = False, - wordpress_protection: bool = False) -> Dict: + wordpress_protection: bool = False, + cert_groups: Optional[List[tuple]] = None) -> Dict: """Create a new site configuration. When ``ssl_cert``/``ssl_key`` are given the generated vhost serves HTTPS @@ -471,7 +474,7 @@ class NginxService: php_version=php_version, ssl_cert=ssl_cert, ssl_key=ssl_key, upstream=upstream, micro_cache=micro_cache, micro_cache_ttl=micro_cache_ttl, immutable_assets=immutable_assets, - wordpress_protection=wordpress_protection, + wordpress_protection=wordpress_protection, cert_groups=cert_groups, ) if not rendered.get('success'): return rendered @@ -721,6 +724,16 @@ class NginxService: if content is None: return {'success': False, 'error': f'Could not read site {name}'} + # Already HTTPS: swap the certificate in place. Re-running the + # insert below would rewrite the redirect block's `listen 80;` + # too and leave a duplicate 443 listen that fails `nginx -t`. + if re.search(r'^\s*ssl_certificate\s', content, re.M): + swapped = re.sub(r'^(\s*ssl_certificate)\s+[^;]+;', + lambda m: f'{m.group(1)} {cert_path};', content, flags=re.M) + swapped = re.sub(r'^(\s*ssl_certificate_key)\s+[^;]+;', + lambda m: f'{m.group(1)} {key_path};', swapped, flags=re.M) + return cls.write_vhost(name, swapped) + # Extract domains for redirect match = re.search(r'server_name\s+([^;]+);', content) domains_str = match.group(1).strip() if match else name diff --git a/backend/app/services/site_domain_service.py b/backend/app/services/site_domain_service.py index 6a07f6a9..b8362b36 100644 --- a/backend/app/services/site_domain_service.py +++ b/backend/app/services/site_domain_service.py @@ -477,7 +477,8 @@ class SiteDomainService: return warnings @classmethod - def _vhost_create_kwargs(cls, app, domains, ssl_cert, ssl_key, force_type=None): + def _vhost_create_kwargs(cls, app, domains, ssl_cert, ssl_key, force_type=None, + cert_groups=None): """Build ``NginxService.create_site(**kwargs)`` for ``app``, or ``(None, reason)`` when the app type can't be served by host nginx or is missing what it needs (a port for proxied apps, a root for served ones). @@ -492,6 +493,7 @@ class SiteDomainService: # (app_vhost_kwargs -> render_site_config) always agree on it — # an enabled cache must never show up as config drift. base = dict(name=app.name, domains=domains, ssl_cert=ssl_cert, ssl_key=ssl_key, + **({'cert_groups': cert_groups} if cert_groups else {}), micro_cache=bool(getattr(app, 'micro_cache_enabled', False)), micro_cache_ttl=getattr(app, 'micro_cache_ttl', None), immutable_assets=bool(getattr(app, 'immutable_assets', False))) @@ -541,18 +543,43 @@ class SiteDomainService: # straight back into server_name — the vhost would keep serving a domain # the user removed, and drift detection (which renders through this same # function) would report the correct config as drifted. - domains = [d.name for d in Domain.query_active().filter_by(application_id=app.id).all()] - if not domains: + rows = Domain.query_active().filter_by(application_id=app.id).all() + if not rows: return None, None + domains = [d.name for d in rows] - # Pick a wildcard cert only when all domains sit under one base (whichever - # base covers them) and that base has HTTPS set up. - ssl_cert = ssl_key = None - cover = cls.covering_base(domains[0]) - if cover and cls.https_enabled(cover) and all(cls.covering_base(d) == cover for d in domains): - ssl_cert, ssl_key = cls.wildcard_cert_paths(cover) + # Each domain's certificate: its base's wildcard when that base has + # HTTPS, else the domain's own issued cert. Rebuilding the vhost from + # rows (deploys, slot switches, drift repair, restore) used to know + # only wildcards, so a custom domain's HTTPS vanished on the next one. + pairs = [(d.name, cls._domain_cert(d)) for d in rows] + certs = {cert for _, cert in pairs} + if len(certs) == 1: + ssl_cert, ssl_key = next(iter(certs)) or (None, None) + return cls._vhost_create_kwargs(app, domains, ssl_cert, ssl_key, force_type) - return cls._vhost_create_kwargs(app, domains, ssl_cert, ssl_key, force_type) + groups = {} + for name, cert in pairs: + groups.setdefault(cert, []).append(name) + cert_groups = [(names, *(cert or (None, None))) for cert, names in groups.items()] + return cls._vhost_create_kwargs(app, domains, None, None, force_type, + cert_groups=cert_groups) + + @classmethod + def _domain_cert(cls, domain): + """``(cert, key)`` serving ``domain`` over HTTPS, or ``None`` for HTTP.""" + cover = cls.covering_base(domain.name) + if cover and cls.https_enabled(cover): + return cls.wildcard_cert_paths(cover) + if domain.ssl_enabled and domain.ssl_certificate_path: + key = domain.ssl_key_path + if not key and domain.ssl_certificate_path.endswith('/fullchain.pem'): + # Rows enabled through the domains API before it stored the + # key path: certbot keeps privkey.pem next to fullchain.pem. + key = domain.ssl_certificate_path[:-len('fullchain.pem')] + 'privkey.pem' + if key: + return domain.ssl_certificate_path, key + return None @classmethod def set_immutable_assets(cls, app, enabled): diff --git a/backend/tests/test_custom_domain_ssl_survives.py b/backend/tests/test_custom_domain_ssl_survives.py new file mode 100644 index 00000000..ade35cfc --- /dev/null +++ b/backend/tests/test_custom_domain_ssl_survives.py @@ -0,0 +1,99 @@ +"""A custom domain's own certificate must survive every vhost rebuild. + +"Enable SSL" used to edit the vhost in place (add_ssl_to_site) while every +later rewrite — deploys, slot switches, attaching a domain, drift repair, +restore — rebuilt it from the Domain rows, which only knew wildcard certs. +So HTTPS on shop.com vanished at the next deploy while the row still said +ssl_enabled. Rebuilds now read each domain's own cert. +""" +import pytest + +from app import db +from app.models import Application, Domain +from app.services.nginx_service import NginxService +from app.services.site_domain_service import SiteDomainService + +SHOP = ('/etc/letsencrypt/live/shop.com/fullchain.pem', '/etc/letsencrypt/live/shop.com/privkey.pem') +WILD = ('/etc/le/live/acme.dev/fullchain.pem', '/etc/le/live/acme.dev/privkey.pem') + + +@pytest.fixture +def site(app, monkeypatch): + monkeypatch.setattr(SiteDomainService, 'covering_base', + classmethod(lambda cls, h: 'acme.dev' if h.endswith('.acme.dev') else None)) + monkeypatch.setattr(SiteDomainService, 'https_enabled', classmethod(lambda cls, base: True)) + monkeypatch.setattr(SiteDomainService, 'wildcard_cert_paths', classmethod(lambda cls, base: WILD)) + application = Application(name='shopcssl', app_type='docker', port=8011, user_id=1) + db.session.add(application) + db.session.flush() + shop = Domain(name='shop.com', application_id=application.id, is_primary=True, + ssl_enabled=True, ssl_certificate_path=SHOP[0], ssl_key_path=SHOP[1]) + db.session.add(shop) + db.session.commit() + yield application + Domain.query.filter_by(application_id=application.id).delete() + db.session.delete(application) + db.session.commit() + + +def _render(application): + kwargs, reason = SiteDomainService.app_vhost_kwargs(application) + assert reason is None + rendered = NginxService.render_site_config(**kwargs) + assert rendered['success'], rendered + return kwargs, rendered['config'] + + +def test_custom_domain_cert_is_rendered(site): + kwargs, config = _render(site) + assert (kwargs['ssl_cert'], kwargs['ssl_key']) == SHOP + assert f'ssl_certificate {SHOP[0]};' in config + + +def test_legacy_row_without_key_path_still_serves_https(site): + """The domains API saved the key under a column that doesn't exist, so + older rows carry only the fullchain path.""" + Domain.query.filter_by(name='shop.com').update({'ssl_key_path': None}) + db.session.commit() + kwargs, _ = _render(site) + assert (kwargs['ssl_cert'], kwargs['ssl_key']) == SHOP + + +def test_mixed_certs_get_one_server_set_each(site): + db.session.add(Domain(name='shop.acme.dev', application_id=site.id)) + db.session.add(Domain(name='plain.example.org', application_id=site.id)) + db.session.commit() + kwargs, config = _render(site) + groups = {tuple(names): cert for names, *cert in kwargs['cert_groups']} + assert groups[('shop.com',)] == list(SHOP) + assert groups[('shop.acme.dev',)] == list(WILD) + assert groups[('plain.example.org',)] == [None, None] + assert config.count('listen 443 ssl') == 2 # one per HTTPS group + assert 'server_name plain.example.org;' in config + assert f'ssl_certificate {SHOP[0]};' in config and f'ssl_certificate {WILD[0]};' in config + + +def test_disabled_ssl_drops_back_to_http(site): + Domain.query.filter_by(name='shop.com').update({'ssl_enabled': False}) + db.session.commit() + kwargs, config = _render(site) + assert kwargs['ssl_cert'] is None + assert 'ssl_certificate' not in config + + +def test_add_ssl_to_site_twice_swaps_the_cert(tmp_path, monkeypatch): + """The manual path re-run must not duplicate the 443 listen.""" + first = NginxService.render_site_config( + 'manual', 'static', ['m.example.com'], root_path='/var/www/m', + ssl_cert='/old/fullchain.pem', ssl_key='/old/privkey.pem')['config'] + written = {} + monkeypatch.setattr(NginxService, 'SITES_AVAILABLE', str(tmp_path)) + (tmp_path / 'manual').write_text(first, encoding='utf-8') + monkeypatch.setattr(NginxService, 'read_vhost', classmethod(lambda cls, n: first)) + monkeypatch.setattr(NginxService, 'write_vhost', + classmethod(lambda cls, n, c, **k: written.setdefault('c', c) and {'success': True})) + NginxService.add_ssl_to_site('manual', '/new/fullchain.pem', '/new/privkey.pem') + assert written['c'].count('listen 443 ssl') == first.count('listen 443 ssl') + assert 'ssl_certificate /new/fullchain.pem;' in written['c'] + assert 'ssl_certificate_key /new/privkey.pem;' in written['c'] + assert '/old/' not in written['c'] From a79d5010c22f47e3141fcfd82d772e2606524195 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 00:51:38 -0400 Subject: [PATCH 009/171] Escape % in crontab commands cron treats a bare % as end-of-command and pipes the rest to stdin, so a job like 'date +%F >> log' ran as 'date +' on schedule while Run now (bash -c) ran it correctly. Write lines with \%, unescape when parsing, and locate a job's line by parsing in edit and tracking so legacy unescaped lines are still found and fixed. --- backend/app/services/cron_service.py | 53 ++++++++++++----------- backend/tests/test_cron_percent_escape.py | 43 ++++++++++++++++++ 2 files changed, 70 insertions(+), 26 deletions(-) create mode 100644 backend/tests/test_cron_percent_escape.py diff --git a/backend/app/services/cron_service.py b/backend/app/services/cron_service.py index c1aef047..578974ee 100644 --- a/backend/app/services/cron_service.py +++ b/backend/app/services/cron_service.py @@ -273,6 +273,8 @@ class CronService: minute, hour, day, month, weekday, command = match.groups() schedule = f"{minute} {hour} {day} {month} {weekday}" + # cron turns a bare % into a newline; lines we write escape it. + command = command.replace('\\%', '%') return { 'id': f"cron_{index}", @@ -325,7 +327,7 @@ class CronService: return parsed['command'] in { command, f"{SHIM_PATH} {job_id} -- {command}", - cls._crontab_command(command, True, job_id), + cls._wrapped_command(command, True, job_id), } @classmethod @@ -442,7 +444,7 @@ class CronService: clean_name = re.sub(r'\s+', ' ', str(name)).strip() if clean_name: comment += f" ({clean_name})" - new_line = f"{schedule} {command}" + new_line = f"{schedule} {cls._crontab_command(command, False, job_id)}" new_crontab = f"{current_crontab.rstrip()}\n{comment}\n{new_line}\n" failure = cls._install_crontab(new_crontab) @@ -656,17 +658,8 @@ class CronService: current = cls._read_crontab() if current is not None: tracked = bool(job_data.get('tracked', False)) - old_line = f"{old_schedule} {cls._crontab_command(old_command, tracked, job_id)}" new_line = f"{new_schedule} {cls._crontab_command(new_command, tracked, job_id)}" - lines = current.split('\n') - new_lines = [] - for line in lines: - if old_line in line: - new_lines.append(new_line) - else: - new_lines.append(line) - - failure = cls._install_crontab('\n'.join(new_lines)) + failure = cls._rewrite_job_line(old_schedule, old_command, job_id, new_line) if failure: return failure @@ -759,18 +752,22 @@ class CronService: # ------------------------------------------------------------------ # @classmethod - def _crontab_command(cls, command: str, tracked: bool, job_id: str) -> str: - """Build the crontab command for a job. - - Tracked jobs are wrapped by the serverkit-cron-run shim so every run - records its exit code + output tail; untracked jobs are byte-identical - to the bare command (an untracked line is indistinguishable from a - hand-written one).""" + def _wrapped_command(cls, command: str, tracked: bool, job_id: str) -> str: + """The command a job's line runs: tracked jobs are wrapped by the + serverkit-cron-run shim so every run records its exit code + output + tail; untracked jobs run the bare command.""" if not tracked: return command python = sys.executable or 'python3' return f"{python} {SHIM_PATH} {job_id} -- {command}" + @classmethod + def _crontab_command(cls, command: str, tracked: bool, job_id: str) -> str: + """The job's command as written into the crontab. An unescaped % ends + the command there and feeds the rest to it as stdin, so + `date +%F` would run as `date +`.""" + return cls._wrapped_command(command, tracked, job_id).replace('%', '\\%') + @classmethod def get_job(cls, job_id: str) -> Optional[Dict]: """Return a single job's metadata (with a normalized `tracked` flag), or @@ -803,9 +800,8 @@ class CronService: if cls.is_linux() and enabled != was_tracked: schedule = job_data.get('schedule', '') command = job_data.get('command', '') - old_line = f"{schedule} {cls._crontab_command(command, was_tracked, job_id)}" new_line = f"{schedule} {cls._crontab_command(command, enabled, job_id)}" - err = cls._replace_crontab_line(old_line, new_line) + err = cls._rewrite_job_line(schedule, command, job_id, new_line) if err is not None: return err @@ -822,14 +818,19 @@ class CronService: } @classmethod - def _replace_crontab_line(cls, old_line: str, new_line: str) -> Optional[Dict]: - """Swap one line in the current user's crontab. Returns None on success - or an error dict. Linux-only (callers guard with is_linux).""" + def _rewrite_job_line(cls, schedule: str, command: str, job_id: str, + new_line: str) -> Optional[Dict]: + """Replace the job's crontab line (found by parsing, so legacy unescaped + and escaped lines both match), keeping a disabled job commented out. + Returns None on success or an error dict. Linux-only.""" current = cls._read_crontab() if current is None: return None - lines = current.split('\n') - new_lines = [new_line if line == old_line else line for line in lines] + new_lines = [ + (f"# {new_line}" if line.lstrip().startswith('#') else new_line) + if cls._line_is_job(line, schedule, command, job_id) else line + for line in current.split('\n') + ] return cls._install_crontab('\n'.join(new_lines)) # ------------------------------------------------------------------ # diff --git a/backend/tests/test_cron_percent_escape.py b/backend/tests/test_cron_percent_escape.py new file mode 100644 index 00000000..27b2cb29 --- /dev/null +++ b/backend/tests/test_cron_percent_escape.py @@ -0,0 +1,43 @@ +"""A bare % in a crontab command is cron syntax: it ends the command there +and pipes the rest to it as stdin. `date +%F >> log` therefore ran as +`date +` on schedule while "Run now" (bash -c) ran the real thing, so +testing it in the panel looked fine. Lines are written escaped, and every +lookup still finds both escaped and legacy unescaped lines.""" +from app.services.cron_service import CronService + +from test_cron_crontab_join import linux_cron # noqa: F401 (fixture) + +CMD = '/usr/bin/date +%F' +SCHEDULE = '0 3 * * *' + + +def _job_line(crontab): + return [line for line in crontab.split('\n') if line.lstrip('# ').startswith(SCHEDULE)] + + +def test_written_line_escapes_percent(linux_cron): + job_id = CronService.add_job(SCHEDULE, CMD, name='stamp')['job_id'] + assert _job_line(linux_cron['crontab']) == [f'{SCHEDULE} /usr/bin/date +\%F'] + job = next(j for j in CronService.list_jobs()['jobs'] if j['id'] == job_id) + assert job['command'] == CMD + + +def test_toggle_track_and_edit_find_the_escaped_line(linux_cron): + job_id = CronService.add_job(SCHEDULE, CMD, name='stamp')['job_id'] + assert CronService.toggle_job(job_id, False)['success'] + assert _job_line(linux_cron['crontab']) == [f'# {SCHEDULE} /usr/bin/date +\%F'] + assert CronService.toggle_job(job_id, True)['success'] + assert CronService.set_tracking(job_id, True)['success'] + [line] = _job_line(linux_cron['crontab']) + assert line.endswith(f'{job_id} -- /usr/bin/date +\%F') + assert CronService.update_job(job_id, command='/usr/bin/date +%H%M')['success'] + [line] = _job_line(linux_cron['crontab']) + assert line.endswith(f'{job_id} -- /usr/bin/date +\%H\%M') + + +def test_legacy_unescaped_line_is_still_found_and_fixed(linux_cron): + job_id = CronService.add_job(SCHEDULE, CMD, name='stamp')['job_id'] + linux_cron['crontab'] = linux_cron['crontab'].replace('\%', '%') # pre-fix line + assert CronService.update_job(job_id, schedule='0 4 * * *')['success'] + assert '0 4 * * * /usr/bin/date +\%F' in linux_cron['crontab'] + assert '+%F' not in linux_cron['crontab'].replace('\%', '') From 83ea2c59d4e146d48168b9fc46a5d9a5435431d3 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 00:53:25 -0400 Subject: [PATCH 010/171] Write cron and storage settings atomically Both files used a truncating open() and their loaders read damage as empty, so a full disk mid-write reset off-site backups to local and the next cron add replaced every job's metadata with the new job. Route both through the config store's temp+replace write; an unreadable file is moved aside instead of being overwritten. --- backend/app/services/cron_service.py | 15 ++++-- .../app/services/storage_provider_service.py | 17 +++--- backend/app/utils/config_store.py | 5 +- backend/tests/test_settings_files_atomic.py | 52 +++++++++++++++++++ 4 files changed, 75 insertions(+), 14 deletions(-) create mode 100644 backend/tests/test_settings_files_atomic.py diff --git a/backend/app/services/cron_service.py b/backend/app/services/cron_service.py index 578974ee..0fe993a8 100644 --- a/backend/app/services/cron_service.py +++ b/backend/app/services/cron_service.py @@ -16,6 +16,7 @@ from typing import Dict, List, Optional from datetime import datetime import json +from app.utils.config_store import quarantine, save_json_config from app.utils.system import run_checked, unit_is_active # Path for storing job metadata @@ -85,7 +86,12 @@ class CronService: """Load job metadata from file.""" try: return cls._load_jobs_metadata_strict() - except (json.JSONDecodeError, IOError, ValueError): + except (json.JSONDecodeError, ValueError): + # Callers save what they load: without moving the file aside the + # next add would replace every job's metadata with the new one. + quarantine(JOBS_FILE) + return {'jobs': {}} + except IOError: return {'jobs': {}} @classmethod @@ -103,9 +109,10 @@ class CronService: @classmethod def _save_jobs_metadata(cls, data: Dict): """Save job metadata to file.""" - cls._ensure_data_dir() - with open(JOBS_FILE, 'w') as f: - json.dump(data, f, indent=2) + # Atomic: a full disk or a kill mid-write must not truncate the file. + result = save_json_config(JOBS_FILE, data) + if not result['success']: + raise IOError(result['error']) @classmethod def is_linux(cls) -> bool: diff --git a/backend/app/services/storage_provider_service.py b/backend/app/services/storage_provider_service.py index fa26e6b6..33f6f526 100644 --- a/backend/app/services/storage_provider_service.py +++ b/backend/app/services/storage_provider_service.py @@ -6,6 +6,7 @@ from datetime import datetime from typing import Dict, List, Optional from urllib.parse import urlparse +from app.utils.config_store import load_json_config, save_json_config from app import paths from app.utils.crypto import encrypt_secret, decrypt_secret_safe, is_encrypted from app.utils.formatting import format_bytes @@ -33,12 +34,11 @@ class StorageProviderService: @classmethod def get_config(cls) -> Dict: """Get storage provider configuration (secrets decrypted in memory).""" - if os.path.exists(cls.CONFIG_FILE): - try: - with open(cls.CONFIG_FILE, 'r') as f: - return cls._decrypt_config(json.load(f)) - except Exception: - pass + # An unreadable file is moved aside rather than silently read as + # "local", which would quietly stop off-site backups. + stored = load_json_config(cls.CONFIG_FILE, None) + if stored is not None: + return cls._decrypt_config(stored) return { 'provider': 'local', @@ -118,8 +118,9 @@ class StorageProviderService: if val and not is_encrypted(val): config[provider][field] = encrypt_secret(val) - with open(cls.CONFIG_FILE, 'w') as f: - json.dump(config, f, indent=2) + saved = save_json_config(cls.CONFIG_FILE, config) + if not saved['success']: + return saved if os.name != 'nt': os.chmod(cls.CONFIG_FILE, 0o600) return {'success': True, 'message': 'Storage configuration saved'} diff --git a/backend/app/utils/config_store.py b/backend/app/utils/config_store.py index 449279bf..1b3fb336 100644 --- a/backend/app/utils/config_store.py +++ b/backend/app/utils/config_store.py @@ -57,11 +57,12 @@ def load_json_config(path, default): with open(path, 'r') as f: return json.load(f) except Exception: # noqa: BLE001 - _quarantine(path) + quarantine(path) return copy.deepcopy(default) -def _quarantine(path): +def quarantine(path): + """Move an unreadable config aside so the next save can't overwrite it.""" aside = f'{path}.corrupt-{time.strftime("%Y%m%d%H%M%S")}' try: os.replace(path, aside) diff --git a/backend/tests/test_settings_files_atomic.py b/backend/tests/test_settings_files_atomic.py new file mode 100644 index 00000000..02266e6b --- /dev/null +++ b/backend/tests/test_settings_files_atomic.py @@ -0,0 +1,52 @@ +"""cron_jobs.json and the off-site storage settings were written with a plain +truncating open(), and their loaders read a damaged file as empty. A full disk +mid-write then silently turned off-site backups back to "local", and the next +cron add saved a file holding only the new job. Both now go through the atomic +config store, which also moves an unreadable file aside.""" +import json +from unittest.mock import patch + +import pytest + +import app.services.cron_service as cron_mod +from app.services.cron_service import CronService +from app.services.storage_provider_service import StorageProviderService + + +def _fail_dump(*args, **kwargs): + raise OSError(28, 'No space left on device') + + +@pytest.fixture +def jobs_file(tmp_path, monkeypatch): + path = tmp_path / 'cron_jobs.json' + monkeypatch.setattr(cron_mod, 'JOBS_FILE', str(path)) + monkeypatch.setattr(CronService, 'is_linux', classmethod(lambda cls: False)) + return path + + +def test_failed_cron_save_keeps_the_old_file(jobs_file): + assert CronService.add_job('0 3 * * *', '/usr/bin/true', name='keep')['success'] + before = jobs_file.read_text() + with patch('app.utils.config_store.json.dump', _fail_dump), pytest.raises(OSError): + CronService.add_job('0 4 * * *', '/usr/bin/false', name='new') + assert jobs_file.read_text() == before + + +def test_corrupt_cron_file_is_moved_aside_not_overwritten(jobs_file): + jobs_file.write_text('{"jobs": {"job_1": {"name": "precious"', encoding='utf-8') + assert CronService.add_job('0 3 * * *', '/usr/bin/true', name='new')['success'] + aside = list(jobs_file.parent.glob('cron_jobs.json.corrupt-*')) + assert len(aside) == 1 and 'precious' in aside[0].read_text() + + +def test_failed_storage_save_keeps_the_old_file(tmp_path, monkeypatch): + path = tmp_path / 'storage.json' + path.write_text(json.dumps({'provider': 's3', 's3': {'bucket': 'b'}}), encoding='utf-8') + monkeypatch.setattr(StorageProviderService, 'CONFIG_FILE', str(path)) + before = path.read_text() + with patch('app.utils.config_store.json.dump', _fail_dump): + result = StorageProviderService.save_config({'provider': 'b2', 'b2': {'bucket': 'x'}}) + assert result['success'] is False + assert path.read_text() == before + assert StorageProviderService.get_config()['provider'] == 's3' From 2dee9fa89109736b4e23209107eccb769e2fad34 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 00:56:42 -0400 Subject: [PATCH 011/171] Pass DB passwords via env, not the command line docker exec -e MYSQL_PWD=, mysqldump -p and friends put the root DB password in argv, readable by every local account through ps or /proc. Add secret_env() and hand the password to the child's environment (bare -e NAME for docker exec), and drop it from the mysqladmin readiness ping, which never needed it. --- backend/app/services/backup_service.py | 11 ++- backend/app/services/database_service.py | 18 ++--- backend/app/services/db_sync_service.py | 43 +++++------ .../services/environment_pipeline_service.py | 4 +- backend/app/utils/system.py | 9 +++ backend/tests/test_db_password_not_on_argv.py | 72 +++++++++++++++++++ 6 files changed, 116 insertions(+), 41 deletions(-) create mode 100644 backend/tests/test_db_password_not_on_argv.py diff --git a/backend/app/services/backup_service.py b/backend/app/services/backup_service.py index 3f30ef40..bc3cce06 100644 --- a/backend/app/services/backup_service.py +++ b/backend/app/services/backup_service.py @@ -17,7 +17,7 @@ from app.utils import backup_crypto from app.utils.config_store import load_json_config, save_json_config from app.utils.formatting import format_bytes from app.utils.system import ( - is_command_available, run_checked, run_from_gzip, run_to_gzip, + is_command_available, run_checked, run_from_gzip, run_to_gzip, secret_env, ) from app.services.telemetry_service import TelemetryService, generate_correlation_id from app.services import backup_schedule_service @@ -197,13 +197,12 @@ class BackupService: cmd = ['mysqldump'] if config.get('user'): cmd.extend(['-u', config['user']]) - if config.get('password'): - cmd.append(f"-p{config['password']}") if config.get('host'): cmd.extend(['-h', config['host']]) cmd.append(db_name) - result = run_to_gzip(cmd, backup_file) + result = run_to_gzip(cmd, backup_file, + env=secret_env(MYSQL_PWD=config.get('password'))) if not result['success']: return {'success': False, 'error': result['error']} @@ -470,13 +469,11 @@ class BackupService: cmd = ['mysql'] if user: cmd.extend(['-u', user]) - if password: - cmd.append(f"-p{password}") if host: cmd.extend(['-h', host]) cmd.append(db_name) - result = run_from_gzip(cmd, backup_path) + result = run_from_gzip(cmd, backup_path, env=secret_env(MYSQL_PWD=password)) elif db_type == 'postgresql': if not is_command_available('psql'): diff --git a/backend/app/services/database_service.py b/backend/app/services/database_service.py index 715048be..80398b1f 100644 --- a/backend/app/services/database_service.py +++ b/backend/app/services/database_service.py @@ -7,7 +7,7 @@ import json from datetime import datetime from app import paths -from app.utils.system import run_checked, unit_is_active +from app.utils.system import run_checked, secret_env, unit_is_active def _validate_identifier(name: str, max_length: int = 64) -> bool: @@ -1200,9 +1200,10 @@ class DatabaseService: try: cmd = ['docker', 'exec'] - # Use MYSQL_PWD env var to avoid passing password on CLI + # Bare `-e MYSQL_PWD`: docker reads the value from our env, so the + # password never sits in the docker command line. if password: - cmd.extend(['-e', f'MYSQL_PWD={password}']) + cmd.extend(['-e', 'MYSQL_PWD']) cmd.extend([container_name, DatabaseService._docker_db_client(container_name), '-u', user]) @@ -1214,7 +1215,7 @@ class DatabaseService: cmd.extend(['-e', query]) - return run_checked(cmd, timeout=timeout) + return run_checked(cmd, timeout=timeout, env=secret_env(MYSQL_PWD=password)) except Exception as e: return {'success': False, 'error': str(e)} @@ -1236,7 +1237,7 @@ class DatabaseService: cmd = ['docker', 'exec'] # PGPASSWORD via the exec environment, never on the command line. if password: - cmd.extend(['-e', f'PGPASSWORD={password}']) + cmd.extend(['-e', 'PGPASSWORD']) cmd.extend([container_name, 'psql', '-U', user, '-d', database or 'postgres', '-v', 'ON_ERROR_STOP=1', @@ -1245,7 +1246,7 @@ class DatabaseService: # tab, not the '|' default: the callers that parse this split # on tabs, and a '|' is legal inside a value. cmd.extend(['-F', '\t']) - return run_checked(cmd, timeout=timeout) + return run_checked(cmd, timeout=timeout, env=secret_env(PGPASSWORD=password)) except Exception as e: return {'success': False, 'error': str(e)} @@ -1338,9 +1339,8 @@ class DatabaseService: start_time = time.time() cmd = ['docker', 'exec'] - # Use MYSQL_PWD env var to avoid passing password on CLI if password: - cmd.extend(['-e', f'MYSQL_PWD={password}']) + cmd.extend(['-e', 'MYSQL_PWD']) cmd.extend([container_name, DatabaseService._docker_db_client(container_name), '-u', user]) cmd.extend([ '-D', database, @@ -1348,7 +1348,7 @@ class DatabaseService: '--batch' ]) - result = run_checked(cmd, timeout=timeout) + result = run_checked(cmd, timeout=timeout, env=secret_env(MYSQL_PWD=password)) execution_time = time.time() - start_time if not result['success']: diff --git a/backend/app/services/db_sync_service.py b/backend/app/services/db_sync_service.py index a961d40a..fbee59bc 100644 --- a/backend/app/services/db_sync_service.py +++ b/backend/app/services/db_sync_service.py @@ -8,7 +8,7 @@ Supports WordPress-specific features like URL search-replace and data anonymizat import os import subprocess -from app.utils.system import run_checked, run_from_gzip, run_to_gzip +from app.utils.system import run_checked, run_from_gzip, run_to_gzip, secret_env import shutil import json import re @@ -38,13 +38,11 @@ class DatabaseSyncService: """Execute a MySQL command.""" try: cmd = ['mysql', '-h', host, '-u', user] - if password: - cmd.append(f'-p{password}') if database: cmd.extend(['-D', database]) cmd.extend(['-e', command]) - return run_checked(cmd, timeout=300) + return run_checked(cmd, timeout=300, env=secret_env(MYSQL_PWD=password)) except Exception as e: return {'success': False, 'error': str(e)} @@ -85,8 +83,6 @@ class DatabaseSyncService: try: # Build mysqldump command cmd = ['mysqldump', '-h', host, '-u', user] - if password: - cmd.append(f'-p{password}') # Add options for consistent snapshot cmd.extend([ @@ -105,13 +101,13 @@ class DatabaseSyncService: # Execute dump if compress: - result = run_to_gzip(cmd, file_path) + result = run_to_gzip(cmd, file_path, env=secret_env(MYSQL_PWD=password)) if not result['success']: return {'success': False, 'error': f"mysqldump failed: {result['error']}"} else: with open(file_path, 'w') as f: result = run_checked(cmd, stdout=f, stderr=subprocess.PIPE, - timeout=None) + timeout=None, env=secret_env(MYSQL_PWD=password)) if not result['success']: return {'success': False, 'error': f"mysqldump failed: {result['error']}"} @@ -191,17 +187,17 @@ class DatabaseSyncService: # Build mysql import command cmd = ['mysql', '-h', host, '-u', user] - if password: - cmd.append(f'-p{password}') cmd.append(target_db) # Handle compressed files if file_path.endswith('.gz'): # 30 min bound for large DBs - result = run_from_gzip(cmd, file_path, timeout=1800) + result = run_from_gzip(cmd, file_path, timeout=1800, + env=secret_env(MYSQL_PWD=password)) else: with open(file_path, 'r') as f: - result = run_checked(cmd, stdin=f, timeout=1800) + result = run_checked(cmd, stdin=f, timeout=1800, + env=secret_env(MYSQL_PWD=password)) if not result['success']: return {'success': False, 'error': result['error']} @@ -571,8 +567,6 @@ class DatabaseSyncService: try: # Build mysqldump command to run inside container dump_cmd = ['mysqldump', '-u', db_user] - if db_password: - dump_cmd.append(f'-p{db_password}') dump_cmd.extend([ '--single-transaction', '--routines', @@ -587,17 +581,19 @@ class DatabaseSyncService: dump_cmd.append(db_name) # Run via docker compose exec - full_cmd = ['docker', 'compose', '-f', compose_path, 'exec', '-T', 'db'] + dump_cmd + full_cmd = (['docker', 'compose', '-f', compose_path, 'exec', '-T'] + + (['-e', 'MYSQL_PWD'] if db_password else []) + ['db'] + dump_cmd) + env = secret_env(MYSQL_PWD=db_password) if compress: - result = run_to_gzip(full_cmd, output_path, timeout=600) + result = run_to_gzip(full_cmd, output_path, timeout=600, env=env) if not result['success']: return {'success': False, 'error': f"Container mysqldump failed: {result['error']}"} else: with open(output_path, 'w') as f: result = run_checked(full_cmd, stdout=f, stderr=subprocess.PIPE, - timeout=600) + timeout=600, env=env) if not result['success']: if os.path.exists(output_path): os.remove(output_path) @@ -647,17 +643,16 @@ class DatabaseSyncService: try: # Build mysql import command - import_cmd = ['docker', 'compose', '-f', compose_path, 'exec', '-T', 'db', - 'mysql', '-u', db_user] - if db_password: - import_cmd.append(f'-p{db_password}') - import_cmd.append(db_name) + import_cmd = (['docker', 'compose', '-f', compose_path, 'exec', '-T'] + + (['-e', 'MYSQL_PWD'] if db_password else []) + + ['db', 'mysql', '-u', db_user, db_name]) + env = secret_env(MYSQL_PWD=db_password) if snapshot_path.endswith('.gz'): - result = run_from_gzip(import_cmd, snapshot_path, timeout=1800) + result = run_from_gzip(import_cmd, snapshot_path, timeout=1800, env=env) else: with open(snapshot_path, 'r') as f: - result = run_checked(import_cmd, stdin=f, timeout=1800) + result = run_checked(import_cmd, stdin=f, timeout=1800, env=env) if not result['success']: return {'success': False, diff --git a/backend/app/services/environment_pipeline_service.py b/backend/app/services/environment_pipeline_service.py index 8fddf569..97a79e03 100644 --- a/backend/app/services/environment_pipeline_service.py +++ b/backend/app/services/environment_pipeline_service.py @@ -1779,7 +1779,9 @@ class EnvironmentPipelineService: for attempt in range(max_attempts): result = EnvironmentDockerService.exec_in_container( compose_path, 'db', - f'mysqladmin -u {db_user} -p{db_password} ping' + # ping exits 0 whenever the server answers, even "Access + # denied", so it needs no password on the command line. + f'mysqladmin -u {db_user} ping' ) if result.get('success'): return True diff --git a/backend/app/utils/system.py b/backend/app/utils/system.py index 2db15480..8be8f555 100644 --- a/backend/app/utils/system.py +++ b/backend/app/utils/system.py @@ -335,6 +335,15 @@ def _streamed(cmd: List[str], pump, *, env: Optional[dict], timeout: Optional[in } +def secret_env(**secrets) -> dict: + """This process's environment plus *secrets*, for passing a password to a + child (MYSQL_PWD, PGPASSWORD) without putting it on the command line, + where every local account can read it from ps or /proc//cmdline. + For ``docker exec``/``docker compose exec`` name the variable bare + (``-e MYSQL_PWD``) so docker copies the value from this environment.""" + return {**os.environ, **{k: v for k, v in secrets.items() if v}} + + def run_to_gzip(cmd: List[str], dest: str, *, env: Optional[dict] = None, timeout: Optional[int] = None) -> dict: """Run *cmd* and gzip its stdout into *dest*; *dest* is removed on failure.""" diff --git a/backend/tests/test_db_password_not_on_argv.py b/backend/tests/test_db_password_not_on_argv.py new file mode 100644 index 00000000..e897e7bb --- /dev/null +++ b/backend/tests/test_db_password_not_on_argv.py @@ -0,0 +1,72 @@ +"""Database passwords travel in the child's environment, never on its command +line: argv is world-readable (ps, /proc//cmdline), so `-p` or +`docker exec -e MYSQL_PWD=` handed the root DB password to every local +account — a compromised site's PHP-FPM user included.""" +from unittest.mock import patch + +import pytest + +PW = 's3cr3t-root' + + +class Spy: + def __init__(self): + self.calls = [] + + def __call__(self, cmd, *args, **kwargs): + self.calls.append((cmd, kwargs.get('env') or {})) + return {'success': True, 'output': '', 'error': '', 'returncode': 0} + + def assert_hidden(self, var): + # Only the calls that log in; a ` --version` probe runs first. + logins = [(cmd, env) for cmd, env in self.calls if '--version' not in cmd] + assert logins + for cmd, env in logins: + assert not any(PW in str(part) for part in cmd), cmd + assert env.get(var) == PW + + +def test_docker_exec_mysql_and_pg(): + from app.services import database_service as mod + from app.services.database_service import DatabaseService + spy = Spy() + with patch.object(mod, 'run_checked', spy): + DatabaseService.docker_mysql_execute('db1', 'SELECT 1', password=PW) + spy.assert_hidden('MYSQL_PWD') + assert 'MYSQL_PWD' in spy.calls[-1][0] # bare name: docker copies our env + + spy = Spy() + with patch.object(mod, 'run_checked', spy): + DatabaseService.docker_pg_execute('pg1', 'SELECT 1', password=PW) + spy.assert_hidden('PGPASSWORD') + + +def test_backup_and_restore(tmp_path): + from app.services import backup_service as mod + from app.services.backup_service import BackupService + spy = Spy() + with patch.object(mod, 'is_command_available', lambda c: True), \ + patch.object(mod, 'run_to_gzip', spy): + BackupService._backup_database_internal( + 'mysql', 'shop', str(tmp_path), {'user': 'root', 'password': PW}) + spy.assert_hidden('MYSQL_PWD') + + dump = tmp_path / 'shop.sql.gz' + dump.write_bytes(b'') + spy = Spy() + with patch.object(mod, 'is_command_available', lambda c: True), \ + patch.object(mod, 'run_from_gzip', spy), \ + patch.object(BackupService, '_resolve_for_restore', lambda p: (p, None)): + BackupService.restore_database(str(dump), 'mysql', 'shop', user='root', password=PW) + spy.assert_hidden('MYSQL_PWD') + + +@pytest.mark.parametrize('call', [ + lambda S: S._run_mysql('SELECT 1', password=PW), +]) +def test_db_sync(call): + from app.services import db_sync_service as mod + spy = Spy() + with patch.object(mod, 'run_checked', spy): + call(mod.DatabaseSyncService) + spy.assert_hidden('MYSQL_PWD') From c5d05971409020054f06434140745fe8a2bb0b30 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 00:57:28 -0400 Subject: [PATCH 012/171] Make login-link redemption truly single-use redeem() checked used_at, then set it and committed, so two requests arriving together (a mail-preview bot and the user, or an attacker racing them) both passed the check and both got a session. Claim the link with one conditional UPDATE and refuse when no row changed. --- backend/app/services/login_link_service.py | 7 ++++++- backend/tests/test_login_links.py | 13 +++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/backend/app/services/login_link_service.py b/backend/app/services/login_link_service.py index 461c4868..dea84151 100644 --- a/backend/app/services/login_link_service.py +++ b/backend/app/services/login_link_service.py @@ -76,8 +76,13 @@ def redeem(token, remote_ip=None): if user is None or not user.is_active: return None, 'inactive' - link.used_at = datetime.utcnow() + # Claim it in one conditional UPDATE: two concurrent redeems both pass the + # is_used check above, but only one can flip used_at from NULL. + claimed = LoginLink.query.filter_by(id=link.id, used_at=None).update( + {'used_at': datetime.utcnow()}, synchronize_session=False) db.session.commit() + if claimed != 1: + return None, 'used' return user, None diff --git a/backend/tests/test_login_links.py b/backend/tests/test_login_links.py index 9a5cb33d..319f4940 100644 --- a/backend/tests/test_login_links.py +++ b/backend/tests/test_login_links.py @@ -193,3 +193,16 @@ def test_register_jobs_registers_reap_kind(app): from app.jobs import registry login_link_service.register_jobs() assert login_link_service.REAP_JOB_KIND in registry.registered_kinds() + + +def test_concurrent_redeems_only_one_wins(client, auth_headers, monkeypatch): + """Two requests that both read the link before either commits used to + both get a session. The claim is a conditional UPDATE, so the loser sees + zero rows even though its earlier is_used check passed.""" + token = _mint(client, auth_headers).get_json()['token'] + user, reason = login_link_service.redeem(token) + assert user is not None and reason is None + # Replay the race: the second request's check saw an unused link. + monkeypatch.setattr(LoginLink, 'is_used', property(lambda self: False)) + user, reason = login_link_service.redeem(token) + assert user is None and reason == 'used' From a915e954742309c46f6c8d082d574bf388904891 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 00:59:21 -0400 Subject: [PATCH 013/171] Send container log streams only to their viewer Every subscriber starts its own docker logs process but emitted into the shared app room, so with two viewers open each saw every line twice, got the other's tail replayed, and both saw 'ended' when either stream stopped. Deliver to the owning socket while room membership still gates it, keeping the per-line access re-check. --- backend/app/sockets.py | 31 ++++++++++++++++----- backend/tests/test_socket_security.py | 39 +++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 6 deletions(-) diff --git a/backend/app/sockets.py b/backend/app/sockets.py index 20d5a93c..a20153ce 100644 --- a/backend/app/sockets.py +++ b/backend/app/sockets.py @@ -142,6 +142,17 @@ def _room_allowed(user, room): and _server_visible(user, server_id)) +def _emit_to_member(sid, room, event, payload): + """Emit to one socket, only while it is still allowed in ``room``.""" + application = getattr(socketio, '_security_app', None) + if application is not None: + with application.app_context(): + _prune_audience(room) + members = socketio.server.manager.get_participants('/', room) + if any(member == sid for member, _ in members): + socketio.emit(event, payload, to=sid) + + def _prune_audience(room=None): # Inspect only this delivery's audience; per-sid metrics should not scan # every other connection for each subscriber. @@ -721,6 +732,14 @@ def handle_subscribe_container_logs(data): # Create stop event for this stream stop_event = threading.Event() + room = rooms.app_logs_room(app_id) + + def deliver(event, payload): + # This `docker logs` process is this socket's alone, so are its lines: + # sending them to the shared room showed every line once per open + # viewer. Room membership is still the gate - pruning drops a socket + # whose access to the app was removed, and then it gets nothing. + _emit_to_member(sid, room, event, payload) # Create thread to read and emit logs def stream_logs(): @@ -730,27 +749,27 @@ def handle_subscribe_container_logs(data): if not line: # Process ended (container stopped or exited) if not stop_event.is_set(): - socketio.emit('container_log_ended', { + deliver('container_log_ended', { 'app_id': app_id, 'message': 'Container log stream ended' - }, room=rooms.app_logs_room(app_id)) + }) break # Parse the log line parsed = DockerService.parse_log_line(line.rstrip('\n')) - socketio.emit('container_log', { + deliver('container_log', { 'app_id': app_id, 'line': line.rstrip('\n'), 'parsed': parsed, 'timestamp': time.time() - }, room=rooms.app_logs_room(app_id)) + }) except Exception as e: if not stop_event.is_set(): - socketio.emit('container_log_error', { + deliver('container_log_error', { 'app_id': app_id, 'message': f'Stream error: {str(e)}' - }, room=rooms.app_logs_room(app_id)) + }) finally: # Clean up try: diff --git a/backend/tests/test_socket_security.py b/backend/tests/test_socket_security.py index 0822bec5..a069202c 100644 --- a/backend/tests/test_socket_security.py +++ b/backend/tests/test_socket_security.py @@ -228,3 +228,42 @@ def test_operator_cannot_join_other_workspace_server(db_session, clients): sock = clients(user) sock.emit('join_room', {'room': sk.rooms.server_channel_room(server.id, 'job:job-1')}) assert sock.get_received()[0]['name'] == 'error' + + +def test_container_log_lines_reach_each_viewer_once(db_session, clients, monkeypatch): + """Each subscriber runs its own `docker logs` process; its lines used to be + sent to the shared app room, so two open viewers each saw every line twice + and got the other's 200-line tail replayed into theirs.""" + import io + user = make_user(db_session, role='viewer') + application = make_application(db_session, user_id=user.id) + procs = [] + + class FakeProcess: + def __init__(self, tag): + self.stdout = io.StringIO(f'{tag}-1\n{tag}-2\n') + procs.append(self) + + def terminate(self): + pass + + def wait(self, timeout=None): + return 0 + + monkeypatch.setattr(sk.DockerService, 'get_all_app_containers', lambda app: [{'name': 'c1'}]) + monkeypatch.setattr(sk.DockerService, 'get_app_container_id', lambda app: 'c1') + monkeypatch.setattr(sk.DockerService, 'get_container_state', lambda cid: 'running') + monkeypatch.setattr(sk.DockerService, 'parse_log_line', lambda line: {'message': line}) + first, second = clients(user), clients(user) + for sock, tag in ((first, 'A'), (second, 'B')): + monkeypatch.setattr(sk.DockerService, 'stream_container_logs', + lambda *a, _tag=tag, **k: FakeProcess(_tag)) + sock.emit('subscribe_container_logs', {'app_id': application.id}) + for info in list(sk.container_log_streams.values()): + info['thread'].join(timeout=5) + + def lines(sock): + return [e['args'][0]['line'] for e in sock.get_received() if e['name'] == 'container_log'] + + assert lines(first) == ['A-1', 'A-2'] + assert lines(second) == ['B-1', 'B-2'] From 1fe8ada10dd108138550ebbc688328ce25278a05 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 01:00:48 -0400 Subject: [PATCH 014/171] Look up agent registration tokens by digest POST /servers/register needs no login and ran a slow PBKDF2 check against every pending server per request, so a few IPs under the 5/min limit could keep the single worker's CPU busy. Tokens carry 256 random bits, so store a SHA-256 digest and find the row directly; hashes issued before this still verify until they expire. --- backend/app/api/servers.py | 9 +--- backend/app/models/server.py | 32 ++++++++++- .../tests/test_registration_token_lookup.py | 54 +++++++++++++++++++ 3 files changed, 87 insertions(+), 8 deletions(-) create mode 100644 backend/tests/test_registration_token_lookup.py diff --git a/backend/app/api/servers.py b/backend/app/api/servers.py index a71cab7e..d8d6faec 100644 --- a/backend/app/api/servers.py +++ b/backend/app/api/servers.py @@ -746,15 +746,10 @@ def register_agent(): data = json_object() token = data.get('token') - if not token: + if not token or not isinstance(token, str): return jsonify({'error': 'Registration token required'}), 400 - # Find server by token (need to check all servers) - server = None - for s in Server.query.filter(Server.registration_token_hash.isnot(None)).all(): - if s.verify_registration_token(token): - server = s - break + server = Server.find_by_registration_token(token) if not server: return jsonify({'error': 'Invalid or expired registration token'}), 401 diff --git a/backend/app/models/server.py b/backend/app/models/server.py index 6816268c..ba6e9e80 100644 --- a/backend/app/models/server.py +++ b/backend/app/models/server.py @@ -1,3 +1,5 @@ +import hashlib +import hmac import uuid import secrets from datetime import datetime @@ -203,9 +205,17 @@ class Server(TimestampMixin, JsonColumnMixin, db.Model): api_secret = secrets.token_urlsafe(32) return api_key, api_secret + @staticmethod + def registration_token_digest(token): + """SHA-256 of a registration token. The token is 256 random bits, so a + slow password hash buys nothing, and a fast exact digest lets the + public /register route look one row up instead of running a + deliberately slow check against every pending server.""" + return 'sha256$' + hashlib.sha256(token.encode()).hexdigest() + def set_registration_token(self, token): """Hash and store registration token""" - self.registration_token_hash = generate_password_hash(token) + self.registration_token_hash = Server.registration_token_digest(token) def verify_registration_token(self, token): """Verify a registration token""" @@ -213,8 +223,28 @@ class Server(TimestampMixin, JsonColumnMixin, db.Model): return False if self.registration_token_expires and datetime.utcnow() > self.registration_token_expires: return False + if self.registration_token_hash.startswith('sha256$'): + return hmac.compare_digest(self.registration_token_hash, + Server.registration_token_digest(token)) + # Tokens issued before the digest switch; they expire on their own. return check_password_hash(self.registration_token_hash, token) + @staticmethod + def find_by_registration_token(token): + """The pending server this token pairs, or None.""" + server = Server.query.filter_by( + registration_token_hash=Server.registration_token_digest(token)).first() + if server is not None: + return server if server.verify_registration_token(token) else None + now = datetime.utcnow() + legacy = Server.query.filter( + Server.registration_token_hash.isnot(None), + ~Server.registration_token_hash.startswith('sha256$'), + db.or_(Server.registration_token_expires.is_(None), + Server.registration_token_expires > now), + ).all() + return next((s for s in legacy if s.verify_registration_token(token)), None) + def set_api_key(self, api_key): """Hash and store API key""" self.api_key_hash = generate_password_hash(api_key) diff --git a/backend/tests/test_registration_token_lookup.py b/backend/tests/test_registration_token_lookup.py new file mode 100644 index 00000000..a054772f --- /dev/null +++ b/backend/tests/test_registration_token_lookup.py @@ -0,0 +1,54 @@ +"""The public /servers/register route ran a deliberately slow PBKDF2 check +against EVERY pending server for each request, so one bad token cost one slow +hash per pending server — unauthenticated CPU burn on the single worker. +Tokens are 256 random bits, so a SHA-256 digest is enough and is looked up +directly; pre-switch hashes still verify until they expire.""" +from datetime import datetime, timedelta +from unittest.mock import patch + +from werkzeug.security import generate_password_hash + +from app import db +from app.models.server import Server +from factories import make_server + + +def _pending(token, legacy=False): + server = make_server(db, name=f'reg-{token[-6:]}') + if legacy: + server.registration_token_hash = generate_password_hash(token) + else: + server.set_registration_token(token) + server.registration_token_expires = datetime.utcnow() + timedelta(hours=1) + db.session.commit() + return server + + +def test_bad_token_runs_no_slow_hash(app): + for n in range(5): + _pending(Server.generate_registration_token()) + with patch('app.models.server.check_password_hash') as slow: + assert Server.find_by_registration_token('sk_reg_nope') is None + slow.assert_not_called() + + +def test_good_and_legacy_tokens_pair(app): + token = Server.generate_registration_token() + server = _pending(token) + assert Server.find_by_registration_token(token).id == server.id + + old = Server.generate_registration_token() + legacy = _pending(old, legacy=True) + assert Server.find_by_registration_token(old).id == legacy.id + + +def test_expired_digest_token_is_refused(app): + token = Server.generate_registration_token() + server = _pending(token) + server.registration_token_expires = datetime.utcnow() - timedelta(minutes=1) + db.session.commit() + assert Server.find_by_registration_token(token) is None + + +def test_register_route_rejects_non_string_token(client): + assert client.post('/api/v1/servers/register', json={'token': 12345}).status_code == 400 From 411ce694da20e2e222153335796c658645754c3b Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 01:02:35 -0400 Subject: [PATCH 015/171] Remove the orphaned manifest preview service The generic preview provisioner replaced its only caller; only its own tests still reached it, proving a path production no longer takes. --- .../app/services/manifest_preview_service.py | 68 ------------------- backend/tests/test_manifest_reach.py | 41 ----------- 2 files changed, 109 deletions(-) delete mode 100644 backend/app/services/manifest_preview_service.py diff --git a/backend/app/services/manifest_preview_service.py b/backend/app/services/manifest_preview_service.py deleted file mode 100644 index 23b1b71f..00000000 --- a/backend/app/services/manifest_preview_service.py +++ /dev/null @@ -1,68 +0,0 @@ -"""Manifest-powered previews. - -A PR preview for a manifest-managed app is an apply with a namespace prefix and -a TTL: it clones the manifest-resolved config (env + the existing -pr-{pr}.{app_domain} domain) with per-preview overrides. This service produces -that resolved config; the preview provisioner consumes it. Real container -spin-up for generic apps stays best-effort (Docker-dependent) — the resolved -config is the portable unit this adds on top of the WordPress-only path. -""" - -import logging -from typing import Any, Dict, Optional - -logger = logging.getLogger(__name__) - - -class ManifestPreviewService: - - @classmethod - def build_preview_config(cls, app, preview) -> Optional[Dict[str, Any]]: - """Resolved config for a manifest-managed app's preview, or None.""" - from app.services.manifest_apply_service import ManifestApplyService - - resolved = ManifestApplyService.resolved_for_app(app) - if not resolved: - return None - - # base env = the app's effective env (manifest literals + resolved refs) - from app.services.env_service import EnvService - try: - env = dict(EnvService.get_effective_env(app.id)) - except Exception: - env = {} - - # per-preview overrides - env['SERVERKIT_PREVIEW'] = 'true' - env['SERVERKIT_PR_NUMBER'] = str(getattr(preview, 'pr_number', '') or '') - if getattr(preview, 'branch', None): - env['SERVERKIT_PREVIEW_BRANCH'] = preview.branch - - return { - 'env': env, - 'domain': getattr(preview, 'domain', None), - 'port': resolved.get('port'), - 'target_server_id': cls._preview_server_id(app, resolved), - 'service': resolved.get('name'), - } - - @staticmethod - def _preview_server_id(app, resolved) -> Optional[str]: - """Where the preview should run: preview settings win, then manifest server, - then the app's own server. (ApplicationPreviewSettings.target_server_id was - plumbed but unused — this makes it live.)""" - try: - from app.models.application_preview import ApplicationPreviewSettings - settings = ApplicationPreviewSettings.query.filter_by( - application_id=app.id).first() - if settings and settings.target_server_id: - return settings.target_server_id - except Exception: - pass - server_ref = resolved.get('server') - if server_ref: - from app.services.manifest_apply_service import ManifestApplyService - resolved_id = ManifestApplyService._resolve_server_id(server_ref) - if resolved_id: - return resolved_id - return getattr(app, 'server_id', None) diff --git a/backend/tests/test_manifest_reach.py b/backend/tests/test_manifest_reach.py index 606c9356..bc578524 100644 --- a/backend/tests/test_manifest_reach.py +++ b/backend/tests/test_manifest_reach.py @@ -78,44 +78,3 @@ def test_unknown_server_is_plan_issue(project, owner): plan = ManifestApplyService.plan(project, n) assert any(i['kind'] == 'unknown_server' and i['server'] == 'ghost' for i in plan['issues']) - - -def test_manifest_preview_config(project, owner): - from app import db - from app.models import Application - from app.models.application_manifest import ApplicationManifest - from app.services.manifest_persistence_service import ManifestPersistenceService - from app.services.manifest_preview_service import ManifestPreviewService - from types import SimpleNamespace - - # a manifest-managed app with declared env - manifest = {'version': 1, 'services': [{ - 'name': 'api', 'type': 'web', 'port': 8000, - 'envVars': [{'key': 'LOG_LEVEL', 'value': 'info'}]}]} - n = ManifestSpecService.normalize(manifest) - ManifestApplyService.apply(project, n, user_id=owner.id) - ManifestPersistenceService.store_manifest(project.id, n) - db.session.commit() - - api = Application.query.filter_by(project_id=project.id, name='api').first() - preview = SimpleNamespace(pr_number=42, branch='feature/x', - domain='pr-42.api.example.com') - config = ManifestPreviewService.build_preview_config(api, preview) - assert config is not None - assert config['env']['LOG_LEVEL'] == 'info' # cloned manifest env - assert config['env']['SERVERKIT_PREVIEW'] == 'true' # per-preview override - assert config['env']['SERVERKIT_PR_NUMBER'] == '42' - assert config['domain'] == 'pr-42.api.example.com' - - -def test_preview_config_none_for_unmanaged_app(project, owner): - from app import db - from app.models import Application - from app.services.manifest_preview_service import ManifestPreviewService - from types import SimpleNamespace - a = Application(name='plain', app_type='docker', user_id=owner.id, - project_id=project.id, status='running') - db.session.add(a) - db.session.commit() - preview = SimpleNamespace(pr_number=1, branch='b', domain='d') - assert ManifestPreviewService.build_preview_config(a, preview) is None From 0704c42daa3f0578d5a7fedd5a76c6b52eaa27eb Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 01:02:37 -0400 Subject: [PATCH 016/171] Drop unused useLogs and logsSourceLabel Nothing imports either; useServiceLogStream replaced the hook, which also left loading stuck on a read error. --- frontend/src/hooks/useMetrics.js | 40 -------------------------------- frontend/src/utils/logText.js | 7 ------ 2 files changed, 47 deletions(-) diff --git a/frontend/src/hooks/useMetrics.js b/frontend/src/hooks/useMetrics.js index 32b2d2d7..4bca768f 100644 --- a/frontend/src/hooks/useMetrics.js +++ b/frontend/src/hooks/useMetrics.js @@ -58,44 +58,4 @@ export function useMetrics(useWebSocket = true, pollInterval = DEFAULT_POLL_INTE return { metrics, loading, error, connected, refresh: fetchMetrics }; } -export function useLogs(filepath) { - const [logs, setLogs] = useState([]); - const [loading, setLoading] = useState(true); - - useEffect(() => { - if (!filepath) return; - - // Fetch initial logs - api.readLog(filepath, 100).then(result => { - if (result.success) { - setLogs(result.lines); - } - setLoading(false); - }); - - // Connect WebSocket for real-time updates - socketService.connect(); - - const unsubLine = socketService.on('log_line', (data) => { - if (data.filepath === filepath) { - setLogs(prev => [...prev.slice(-499), data.line]); - } - }); - - // Subscribe to log stream - socketService.subscribeLogs(filepath); - - return () => { - unsubLine(); - socketService.unsubscribeLogs(); - }; - }, [filepath]); - - const clearLogs = useCallback(() => { - setLogs([]); - }, []); - - return { logs, loading, clearLogs }; -} - export default useMetrics; diff --git a/frontend/src/utils/logText.js b/frontend/src/utils/logText.js index 33850a0e..db589980 100644 --- a/frontend/src/utils/logText.js +++ b/frontend/src/utils/logText.js @@ -22,10 +22,3 @@ export function logsToText(data) { } return ''; } - -// Which backend the output came from ('Docker Compose', 'Docker Compose -// (legacy)', ...), when the response says. Worth showing: it explains an empty -// log more often than the log itself does. -export function logsSourceLabel(data) { - return (data && typeof data === 'object' && data.source_label) || ''; -} From f116accbb8702d98f3488e0fd56b310162bfe4b8 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 01:02:42 -0400 Subject: [PATCH 017/171] Map setup status in one place checkSetupStatus and refreshSetupStatus kept separate copies of the same mapping, and the refresh copy had already lost defaultLanguage. --- frontend/src/contexts/AuthContext.jsx | 51 ++++++++++++--------------- 1 file changed, 22 insertions(+), 29 deletions(-) diff --git a/frontend/src/contexts/AuthContext.jsx b/frontend/src/contexts/AuthContext.jsx index 48b9ca65..e4964c5b 100644 --- a/frontend/src/contexts/AuthContext.jsx +++ b/frontend/src/contexts/AuthContext.jsx @@ -5,6 +5,26 @@ import { presetForUseCases } from '../components/sidebarItems'; import { AuthContext } from './useAuth.js'; +// /auth/setup-status -> context state. One mapping for the first load and +// every refresh: two hand-kept copies had already drifted (the refresh one +// dropped defaultLanguage). +function toSetupStatus(status) { + return { + needsSetup: status.needs_setup, + registrationEnabled: status.registration_enabled, + setupCodeRequired: !!status.setup_code_required, + ssoProviders: status.sso_providers || [], + passwordLoginEnabled: status.password_login_enabled !== false, + panelTitle: status.panel_title || import.meta.env.VITE_PANEL_TITLE || 'ServerKit', + publicTitle: status.public_title || 'Control Panel', + loginLayout: status.login_layout || 'centered', + defaultLanguage: status.default_language || null, + needsMigration: status.needs_migration || false, + migrationInfo: status.migration_info || null, + checked: true + }; +} + export function AuthProvider({ children }) { const [user, setUser] = useState(null); const [loading, setLoading] = useState(true); @@ -59,21 +79,7 @@ export function AuthProvider({ children }) { const checkSetupStatus = useCallback(async function checkSetupStatus(retries = 3) { try { - const status = await api.getSetupStatus(); - setSetupStatus({ - needsSetup: status.needs_setup, - registrationEnabled: status.registration_enabled, - setupCodeRequired: !!status.setup_code_required, - ssoProviders: status.sso_providers || [], - passwordLoginEnabled: status.password_login_enabled !== false, - panelTitle: status.panel_title || import.meta.env.VITE_PANEL_TITLE || 'ServerKit', - publicTitle: status.public_title || 'Control Panel', - loginLayout: status.login_layout || 'centered', - defaultLanguage: status.default_language || null, - needsMigration: status.needs_migration || false, - migrationInfo: status.migration_info || null, - checked: true - }); + setSetupStatus(toSetupStatus(await api.getSetupStatus())); // Always check auth — user may be mid-onboarding wizard with valid session await checkAuth(); @@ -109,20 +115,7 @@ export function AuthProvider({ children }) { async function refreshSetupStatus() { try { - const status = await api.getSetupStatus(); - setSetupStatus({ - needsSetup: status.needs_setup, - registrationEnabled: status.registration_enabled, - setupCodeRequired: !!status.setup_code_required, - ssoProviders: status.sso_providers || [], - passwordLoginEnabled: status.password_login_enabled !== false, - panelTitle: status.panel_title || import.meta.env.VITE_PANEL_TITLE || 'ServerKit', - publicTitle: status.public_title || 'Control Panel', - loginLayout: status.login_layout || 'centered', - needsMigration: status.needs_migration || false, - migrationInfo: status.migration_info || null, - checked: true - }); + setSetupStatus(toSetupStatus(await api.getSetupStatus())); } catch (error) { console.error('Failed to refresh setup status:', error); } From e3131659c2a4f9fd96ff4f44e55652859d0300a8 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 01:03:40 -0400 Subject: [PATCH 018/171] Satisfy the test seed ratchet The custom-domain SSL test seeded its app by hand instead of through make_application, and test_manifest_reach.py no longer seeds one, so its baseline entry went stale. --- backend/tests/test_custom_domain_ssl_survives.py | 7 +++---- backend/tests/test_seed_one_door_ratchet.py | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/backend/tests/test_custom_domain_ssl_survives.py b/backend/tests/test_custom_domain_ssl_survives.py index ade35cfc..1f1ba069 100644 --- a/backend/tests/test_custom_domain_ssl_survives.py +++ b/backend/tests/test_custom_domain_ssl_survives.py @@ -9,7 +9,8 @@ ssl_enabled. Rebuilds now read each domain's own cert. import pytest from app import db -from app.models import Application, Domain +from app.models import Domain +from factories import make_application from app.services.nginx_service import NginxService from app.services.site_domain_service import SiteDomainService @@ -23,9 +24,7 @@ def site(app, monkeypatch): classmethod(lambda cls, h: 'acme.dev' if h.endswith('.acme.dev') else None)) monkeypatch.setattr(SiteDomainService, 'https_enabled', classmethod(lambda cls, base: True)) monkeypatch.setattr(SiteDomainService, 'wildcard_cert_paths', classmethod(lambda cls, base: WILD)) - application = Application(name='shopcssl', app_type='docker', port=8011, user_id=1) - db.session.add(application) - db.session.flush() + application = make_application(db, name='shopcssl', port=8011) shop = Domain(name='shop.com', application_id=application.id, is_primary=True, ssl_enabled=True, ssl_certificate_path=SHOP[0], ssl_key_path=SHOP[1]) db.session.add(shop) diff --git a/backend/tests/test_seed_one_door_ratchet.py b/backend/tests/test_seed_one_door_ratchet.py index 0cea5440..0bafea3f 100644 --- a/backend/tests/test_seed_one_door_ratchet.py +++ b/backend/tests/test_seed_one_door_ratchet.py @@ -94,7 +94,6 @@ APPLICATION_BASELINE = { 'test_manifest_appliance_volumes_bootstrap.py', 'test_manifest_network_identity.py', 'test_manifest_persistence.py', - 'test_manifest_reach.py', 'test_manifest_references.py', 'test_manifest_spec.py', 'test_manifest_sync.py', From a8fb879be80596f54b4971016c08f5f1ef3fe805 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 01:04:25 -0400 Subject: [PATCH 019/171] Stop the speed-test poll when leaving Monitoring The wait loop kept polling for up to 90s after unmount and toasted 'Speed test complete' on whatever page came next. --- frontend/src/pages/Monitoring.jsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/Monitoring.jsx b/frontend/src/pages/Monitoring.jsx index 1062758c..a6e3ac06 100644 --- a/frontend/src/pages/Monitoring.jsx +++ b/frontend/src/pages/Monitoring.jsx @@ -1,4 +1,4 @@ -import { useEffect, useMemo, useState } from 'react'; +import { useEffect, useMemo, useRef, useState } from 'react'; import { Link } from 'react-router-dom'; import useTabParam from '../hooks/useTabParam'; import api from '../services/api'; @@ -226,6 +226,14 @@ const Monitoring = () => { } }; + // The speed-test wait loop outlives a navigation unless it checks this: + // it kept polling for 90s and toasted on whatever page came next. + const mountedRef = useRef(true); + useEffect(() => { + mountedRef.current = true; // StrictMode re-mounts after a cleanup + return () => { mountedRef.current = false; }; + }, []); + const handleRunSpeedTest = async () => { try { setSpeedTestRunning(true); @@ -234,6 +242,7 @@ const Monitoring = () => { const deadline = Date.now() + SPEEDTEST_POLL_TIMEOUT_MS; while (Date.now() < deadline) { await new Promise((resolve) => setTimeout(resolve, SPEEDTEST_POLL_INTERVAL_MS)); + if (!mountedRef.current) return; const res = await loadSpeedTest(); const latest = res?.last_result; if (latest?.tested_at && latest.tested_at !== previousTestedAt) { @@ -242,11 +251,12 @@ const Monitoring = () => { return; } } + if (!mountedRef.current) return; toast.warning(t('app.monitoring.speedTestIsStillRunningRefresh', 'Speed test is still running. Refresh in a moment.')); } catch (err) { toastError(toast, t('app.monitoring.failedToStartSpeedTest', "Couldn't start the speed test."), err); } finally { - setSpeedTestRunning(false); + if (mountedRef.current) setSpeedTestRunning(false); } }; From d2a83ce6a8dcdd5a222059a168f6e7dba5b5aa9a Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 01:05:49 -0400 Subject: [PATCH 020/171] Make panel thread count configurable Every open WebSocket and every long-polling agent holds one of the single process's 100 threads, so ~60 agents plus 40 tabs stalled the UI with no clear error. Read --threads from SERVERKIT_THREADS in the systemd unit and Docker image, and document the ceiling next to the single-worker constraint. --- Dockerfile | 2 +- docs/ARCHITECTURE.md | 8 ++++++++ docs/ENVIRONMENT.md | 1 + templates/serverkit-backend.service.in | 4 +++- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ab5a6577..df8a0189 100644 --- a/Dockerfile +++ b/Dockerfile @@ -190,4 +190,4 @@ WORKDIR /app/backend # Single process (agent gateway state is in-memory) + threads: the app runs # async_mode='threading' (simple-websocket serves WS); a gevent-websocket # worker would double-answer the upgrade handshake and break WebSocket. -CMD ["sh", "-c", "exec gunicorn --workers 1 --threads 100 --bind 0.0.0.0:${SERVERKIT_BACKEND_PORT:-5000} --timeout 120 --access-logfile - --error-logfile - run:app"] +CMD ["sh", "-c", "exec gunicorn --workers 1 --threads ${SERVERKIT_THREADS:-100} --bind 0.0.0.0:${SERVERKIT_BACKEND_PORT:-5000} --timeout 120 --access-logfile - --error-logfile - run:app"] diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 30e1e074..71b89fec 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -694,6 +694,14 @@ networks where WebSocket is blocked. > `async_mode='threading'`; the **gevent-websocket worker class double-answers > the WS handshake and breaks WebSocket**. > +> +> **Thread ceiling.** In threading mode every open WebSocket — each browser tab +> and each agent — and every agent on the long-poll fallback (which waits up to +> 25s per poll and then polls again) holds one gunicorn thread for as long as it +> stays connected. With the default 100 threads that is roughly 60 agents plus +> 40 open tabs before ordinary HTTP requests start queueing and the UI stalls +> without a clear error. Size `SERVERKIT_THREADS` for the fleet. +> > Scaling to multiple workers without a shared backplane (e.g. a Redis message > queue) will silently misroute or drop commands for agents connected to a > different worker. See [HORIZONTAL_SCALING_SPEC.md](HORIZONTAL_SCALING_SPEC.md) diff --git a/docs/ENVIRONMENT.md b/docs/ENVIRONMENT.md index 5d6df369..8e6b65ae 100644 --- a/docs/ENVIRONMENT.md +++ b/docs/ENVIRONMENT.md @@ -22,6 +22,7 @@ variable that is not listed here. | `DATABASE_URL` | `sqlite:////app/instance/serverkit.db` | SQLAlchemy URL (`sqlite:///...` or `postgresql://...`). In Docker see the compose note in INSTALLATION.md. | | `LOG_LEVEL` | `INFO` (`DEBUG` in development) | Python logging level name (`DEBUG`, `INFO`, `WARNING`, ...). | | `PORT` | `5000` | Port for `python run.py`. Gunicorn deployments bind with `-b` instead. | +| `SERVERKIT_THREADS` | `100` | Request threads in the single panel process (systemd unit and Docker image). Every open WebSocket (a browser tab or an agent) and every long-polling agent holds one for as long as it is connected, so the sum must stay under this with room for normal requests. Raise it for large fleets. | | `SERVERKIT_PROFILE` | `standard` | Install profile (`minimal`, `standard`, `full`) when the panel setting has not overridden it. Written by the installer. | ## Network and proxy diff --git a/templates/serverkit-backend.service.in b/templates/serverkit-backend.service.in index d8375911..6aed0aef 100644 --- a/templates/serverkit-backend.service.in +++ b/templates/serverkit-backend.service.in @@ -17,6 +17,8 @@ WorkingDirectory=@SERVERKIT_DIR@/backend Environment="PATH=@SERVERKIT_VENV_DIR@/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" Environment="FLASK_ENV=production" Environment="SERVERKIT_INSTALL_DIR=@SERVERKIT_DIR@" +# Request threads; .env may override. See docs/ENVIRONMENT.md. +Environment="SERVERKIT_THREADS=100" EnvironmentFile=@SERVERKIT_DIR@/.env # Single PROCESS (-w 1) is mandatory: the agent gateway keeps connected-agent # state in memory. Threaded worker (not GeventWebSocketWorker): the app runs @@ -24,7 +26,7 @@ EnvironmentFile=@SERVERKIT_DIR@/.env # on the raw socket — a gevent-websocket worker ALSO answers the upgrade, # producing a double 101 handshake the browser reports as # "Invalid frame header" (WS then silently degrades to polling). -ExecStart=@SERVERKIT_VENV_DIR@/bin/gunicorn -w 1 --threads 100 -b @BIND_HOST@:@PORT@ --timeout 120 --access-logfile @LOG_DIR@/access.log --error-logfile @LOG_DIR@/error.log run:app +ExecStart=@SERVERKIT_VENV_DIR@/bin/gunicorn -w 1 --threads ${SERVERKIT_THREADS} -b @BIND_HOST@:@PORT@ --timeout 120 --access-logfile @LOG_DIR@/access.log --error-logfile @LOG_DIR@/error.log run:app ExecReload=/bin/kill -HUP $MAINPID Restart=always RestartSec=5 From a9668000da1a43e74a3bef24af1a11cf4aa5eb23 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 01:43:12 -0400 Subject: [PATCH 021/171] Keep the new route logic behind services The SSL-enable and server-overview changes put session and query calls in the routes, tripping the controller-boundary ratchet. Move them into SiteDomainService and WorkspaceService, raise a typed error for bad allowed_ips, point the ACME-contact test at the new vhost door, and regenerate the baseline and inventory (476 -> 453). --- backend/app/api/domains.py | 15 +++------ backend/app/api/servers.py | 5 ++- backend/app/services/site_domain_service.py | 19 +++++++++++ backend/app/services/workspace_service.py | 8 +++++ .../api_controller_boundary_baseline.json | 33 +------------------ backend/tests/test_ssl_acme_contact.py | 4 +-- docs/MIGRATION_INVENTORY.md | 2 +- 7 files changed, 37 insertions(+), 49 deletions(-) diff --git a/backend/app/api/domains.py b/backend/app/api/domains.py index cd1337a7..37a2e55f 100644 --- a/backend/app/api/domains.py +++ b/backend/app/api/domains.py @@ -408,17 +408,10 @@ def enable_ssl(domain_id): return jsonify({'error': result.get('error', 'Failed to obtain certificate')}), 400 from app.services.site_domain_service import SiteDomainService - # Record the cert, then regenerate the vhost from the rows — the same - # door every later rewrite uses, so the HTTPS block survives them. - domain.ssl_enabled = True - domain.ssl_certificate_path = result['certificate_path'] - domain.ssl_key_path = result['private_key_path'] - db.session.flush() - published = SiteDomainService.write_app_vhost(app) - if published.get('warning'): - db.session.rollback() - return jsonify({'error': published['warning']}), 400 - db.session.commit() + error = SiteDomainService.enable_domain_ssl( + app, domain, result['certificate_path'], result['private_key_path']) + if error: + return jsonify({'error': error}), 400 # Only after issuance actually worked — remembering an address that # Let's Encrypt rejected would be worse than not remembering one. diff --git a/backend/app/api/servers.py b/backend/app/api/servers.py index d8d6faec..b106a860 100644 --- a/backend/app/api/servers.py +++ b/backend/app/api/servers.py @@ -609,7 +609,7 @@ def update_server(server_id): if 'allowed_ips' in data: errors = _ip_pattern_errors(data['allowed_ips']) if errors: - return jsonify({'error': 'Invalid IP patterns', 'details': errors}), 400 + raise ValidationError('Invalid IP patterns', details={'patterns': errors}) server.allowed_ips = data['allowed_ips'] # Handle permission profile @@ -931,8 +931,7 @@ def compare_server_metrics(): def get_servers_overview(): """Get overview of all servers health""" from app.services.workspace_service import WorkspaceService - servers = WorkspaceService.filter_accessible_servers( - Server.query, get_current_user()).options(joinedload(Server.group)).all() + servers = WorkspaceService.accessible_servers(get_current_user()) metrics_by_server = latest_metrics_by_server(server.id for server in servers) connected_ids = set(agent_registry.get_connected_servers()) & {s.id for s in servers} diff --git a/backend/app/services/site_domain_service.py b/backend/app/services/site_domain_service.py index b8362b36..a5d61abc 100644 --- a/backend/app/services/site_domain_service.py +++ b/backend/app/services/site_domain_service.py @@ -581,6 +581,25 @@ class SiteDomainService: return domain.ssl_certificate_path, key return None + @classmethod + def enable_domain_ssl(cls, app, domain, cert_path, key_path): + """Record ``domain``'s issued cert and republish ``app``'s vhost. + + The vhost is regenerated from the rows - the same door every later + rewrite uses, so the HTTPS block survives them. Returns None on + success, else the reason, with the row left as it was.""" + from app import db + domain.ssl_enabled = True + domain.ssl_certificate_path = cert_path + domain.ssl_key_path = key_path + db.session.flush() + published = cls.write_app_vhost(app) + if published.get('warning'): + db.session.rollback() + return published['warning'] + db.session.commit() + return None + @classmethod def set_immutable_assets(cls, app, enabled): """Save the fingerprinted-asset caching flag and republish the vhost diff --git a/backend/app/services/workspace_service.py b/backend/app/services/workspace_service.py index b36f3eed..d99d1927 100644 --- a/backend/app/services/workspace_service.py +++ b/backend/app/services/workspace_service.py @@ -173,6 +173,14 @@ class WorkspaceService: allowed.append(Server.workspace_id == default.id) return query.filter(db.or_(*allowed)) + @staticmethod + def accessible_servers(user): + """Every server *user* may operate, with its group loaded.""" + from sqlalchemy.orm import joinedload + from app.models.server import Server + query = WorkspaceService.filter_accessible_servers(Server.query, user) + return query.options(joinedload(Server.group)).all() + @staticmethod def get_accessible_server(user, server_id): """The server if *user* may operate it (see can_access_server), else None.""" diff --git a/backend/tests/api_controller_boundary_baseline.json b/backend/tests/api_controller_boundary_baseline.json index f0c23814..d651fe08 100644 --- a/backend/tests/api_controller_boundary_baseline.json +++ b/backend/tests/api_controller_boundary_baseline.json @@ -3,7 +3,7 @@ "policy": "Exact reviewed inventory of direct persistence, subprocess, and filesystem mutation calls in Flask API controllers. New calls are forbidden; remove entries as controllers delegate to services.", "counts": { "filesystem": 8, - "persistence": 468 + "persistence": 445 }, "owners": { "api/admin.py": { @@ -78,10 +78,6 @@ "owner": "ServerKit backend / files domain", "rationale": "Legacy files controllers still cross a persistence or host-operation boundary; move each call into an app.services use case before removing it." }, - "api/fleet.py": { - "owner": "ServerKit backend / fleet domain", - "rationale": "Legacy fleet controllers still cross a persistence or host-operation boundary; move each call into an app.services use case before removing it." - }, "api/git.py": { "owner": "ServerKit backend / git domain", "rationale": "Legacy git controllers still cross a persistence or host-operation boundary; move each call into an app.services use case before removing it." @@ -114,10 +110,6 @@ "owner": "ServerKit backend / private urls domain", "rationale": "Legacy private urls controllers still cross a persistence or host-operation boundary; move each call into an app.services use case before removing it." }, - "api/proxy.py": { - "owner": "ServerKit backend / proxy domain", - "rationale": "Legacy proxy controllers still cross a persistence or host-operation boundary; move each call into an app.services use case before removing it." - }, "api/python.py": { "owner": "ServerKit backend / python domain", "rationale": "Legacy python controllers still cross a persistence or host-operation boundary; move each call into an app.services use case before removing it." @@ -465,7 +457,6 @@ "api/domains.py::enable_ssl::persistence::Application.query_active().filter_by(id=domain.application_id).first()::1", "api/domains.py::enable_ssl::persistence::Domain.query_active().filter_by(id=domain_id).first()::1", "api/domains.py::enable_ssl::persistence::User.query.get(current_user_id)::1", - "api/domains.py::enable_ssl::persistence::db.session.commit()::1", "api/domains.py::get_domain::persistence::Application.query_active().filter_by(id=domain.application_id).first()::1", "api/domains.py::get_domain::persistence::Domain.query_active().filter_by(id=domain_id).first()::1", "api/domains.py::get_domain::persistence::User.query.get(current_user_id)::1", @@ -491,7 +482,6 @@ "api/domains.py::verify_domain::persistence::Domain.query_active().filter_by(id=domain_id).first()::1", "api/environments.py::create_environment::persistence::db.session.commit()::1", "api/files.py::upload_file::filesystem::os.makedirs(parent)::1", - "api/fleet.py::list_targets::persistence::Server.query.get(server_id)::1", "api/git.py::_webhook_visible_to::persistence::Application.query.get(webhook.app_id)::1", "api/git.py::get_deployment::persistence::Application.query_active().filter_by(id=deployment.app_id).first()::1", "api/git.py::get_deployment::persistence::GitDeployment.query.get(deployment_id)::1", @@ -537,7 +527,6 @@ "api/private_urls.py::update_private_url::persistence::Application.query_active().filter_by(id=app_id).first()::1", "api/private_urls.py::update_private_url::persistence::User.query.get(current_user_id)::1", "api/private_urls.py::update_private_url::persistence::db.session.commit()::1", - "api/proxy.py::_require_server::persistence::Server.query.get(server_id)::1", "api/python.py::create_django_app::persistence::db.session.add(app)::1", "api/python.py::create_django_app::persistence::db.session.commit()::1", "api/python.py::create_flask_app::persistence::db.session.add(app)::1", @@ -557,7 +546,6 @@ "api/recipes.py::submit_recipe_handoff::persistence::DeploymentJob.query.get(job_id)::1", "api/secrets_webhooks.py::create_vault::persistence::Workspace.query.get(explicit_ws)::1", "api/servers.py::acknowledge_alert::persistence::SecurityAlert.query.get(alert_id)::1", - "api/servers.py::compare_server_metrics::persistence::Server.query.get(server_id)::1", "api/servers.py::compare_server_metrics::persistence::ServerMetrics.query.filter_by(server_id=server_id).order_by(ServerMetrics.timestamp.desc()).limit(limit).all()::1", "api/servers.py::create_group::persistence::db.session.add(group)::1", "api/servers.py::create_group::persistence::db.session.commit()::1", @@ -568,48 +556,29 @@ "api/servers.py::delete_group::persistence::ServerGroup.query.get(group_id)::1", "api/servers.py::delete_group::persistence::db.session.commit()::1", "api/servers.py::delete_group::persistence::db.session.delete(group)::1", - "api/servers.py::delete_server::persistence::Server.query.get(server_id)::1", "api/servers.py::delete_server::persistence::db.session.commit()::1", "api/servers.py::delete_server::persistence::db.session.delete(server)::1", - "api/servers.py::get_allowed_ips::persistence::Server.query.get(server_id)::1", - "api/servers.py::get_command_history::persistence::Server.query.get(server_id)::1", "api/servers.py::get_command_history::persistence::ServerCommand.query.filter_by(server_id=server_id).order_by(ServerCommand.created_at.desc()).limit(limit).all()::1", "api/servers.py::get_connection_info::persistence::AgentSession.query.filter_by(server_id=server_id, is_active=True).first()::1", - "api/servers.py::get_connection_info::persistence::Server.query.get(server_id)::1", "api/servers.py::get_group::persistence::ServerGroup.query.get(group_id)::1", - "api/servers.py::get_server::persistence::Server.query.get(server_id)::1", "api/servers.py::get_server::persistence::db.session.commit()::1", "api/servers.py::get_server::persistence::db.session.rollback()::1", - "api/servers.py::get_server_metrics::persistence::Server.query.get(server_id)::1", "api/servers.py::get_server_metrics::persistence::ServerMetrics.query.filter_by(server_id=server_id)::1", - "api/servers.py::get_server_onboarding_status::persistence::Server.query.get(server_id)::1", - "api/servers.py::get_server_security_alerts::persistence::Server.query.get(server_id)::1", - "api/servers.py::get_server_status::persistence::Server.query.get(server_id)::1", - "api/servers.py::get_servers_overview::persistence::Server.query.options(joinedload(Server.group)).all()::1", "api/servers.py::list_groups::persistence::ServerGroup.query.all()::1", - "api/servers.py::ping_server::persistence::Server.query.get(server_id)::1", "api/servers.py::regenerate_token::persistence::db.session.commit()::1", - "api/servers.py::register_agent::persistence::Server.query.filter(Server.registration_token_hash.isnot(None)).all()::1", "api/servers.py::register_agent::persistence::db.session.commit()::1", "api/servers.py::resolve_alert::persistence::SecurityAlert.query.get(alert_id)::1", - "api/servers.py::retry_server_onboarding::persistence::Server.query.get(server_id)::1", - "api/servers.py::rotate_api_key::persistence::Server.query.get(server_id)::1", "api/servers.py::rotate_api_key::persistence::db.session.commit()::1", "api/servers.py::set_server_workspace::persistence::Server.query.filter_by(workspace_id=ws.id).count()::1", "api/servers.py::set_server_workspace::persistence::Workspace.query.get(target)::1", "api/servers.py::set_server_workspace::persistence::db.session.commit()::1", - "api/servers.py::start_server_onboarding::persistence::Server.query.get(server_id)::1", - "api/servers.py::update_allowed_ips::persistence::Server.query.get(server_id)::1", "api/servers.py::update_allowed_ips::persistence::db.session.commit()::1", "api/servers.py::update_group::persistence::ServerGroup.query.get(group_id)::1", "api/servers.py::update_group::persistence::db.session.commit()::1", - "api/servers.py::update_server::persistence::Server.query.get(server_id)::1", "api/servers.py::update_server::persistence::db.session.commit()::1", "api/servers_agents.py::add_agent_version::persistence::db.session.add(version)::1", "api/servers_agents.py::add_agent_version::persistence::db.session.commit()::1", - "api/servers_agents.py::get_install_instructions::persistence::Server.query.get(server_id)::1", "api/servers_agents.py::list_agent_versions::persistence::AgentVersion.query.order_by(AgentVersion.version.desc()).all()::1", - "api/servers_agents.py::trigger_agent_update::persistence::Server.query.get(server_id)::1", "api/servers_agents.py::upgrade_fleet::persistence::Server.query.filter_by(status='online').all()::1", "api/shared_resources.py::_check_resource_write::persistence::ManagedDatabase.query_active().filter_by(id=int(resource_id)).first()::1", "api/shared_resources.py::_check_resource_write::persistence::Server.query.get(str(resource_id))::1", diff --git a/backend/tests/test_ssl_acme_contact.py b/backend/tests/test_ssl_acme_contact.py index 964a1b0f..07cd397c 100644 --- a/backend/tests/test_ssl_acme_contact.py +++ b/backend/tests/test_ssl_acme_contact.py @@ -150,8 +150,8 @@ class TestEnableSslUsesTheStoredContact: 'private_key_path': '/k.pem'} with patch('app.api.domains.SSLService.obtain_certificate', return_value=cert) as obtain, \ - patch('app.api.domains.NginxService.add_ssl_to_site', - return_value={'success': True}): + patch('app.services.site_domain_service.SiteDomainService.write_app_vhost', + return_value={'nginx': {'success': True}, 'warning': None}): resp = client.post(f'/api/v1/domains/{domain.id}/ssl/enable', json=body, headers=headers) return resp, obtain diff --git a/docs/MIGRATION_INVENTORY.md b/docs/MIGRATION_INVENTORY.md index 9d6b3236..fdb4e968 100644 --- a/docs/MIGRATION_INVENTORY.md +++ b/docs/MIGRATION_INVENTORY.md @@ -18,7 +18,7 @@ debt. Regenerate with `python scripts/generate-migration-inventory.py`. | API crashes swallowed without recording | app.error_reporting | 0 | 0 | INVARIANT at 0 | | Hand-shaped {'error': ...} bodies in app/api | typed errors + the global handler | 849 | 850 | migrate when touched; new endpoints raise | | Raw subprocess calls outside the runners | app/utils/system.py runners | 23 | 23 | migrate when touched | -| Controller-boundary violations (routes doing service work) | service layer extraction | 476 | 476 | migrate when touched (first-wave ratchet) | +| Controller-boundary violations (routes doing service work) | service layer extraction | 453 | 453 | migrate when touched (first-wave ratchet) | | raw api.* calls in pages/ | E1: useServerQuery/useServerMutation | 374 | 398 | migrate when touched | | per-page toast.error extractions in pages/ | E1: query-layer error presentation | 191 | 206 | migrate when touched | | hand-rolled form-group blocks | F2: FormField/useForm | 314 | 321 | migrate when touched | From cdd6d0898de218c57ac676050697b8d5ddad00ba Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 01:44:23 -0400 Subject: [PATCH 022/171] Drop the unused schedule and passlib packages Each survived as a single import nothing called: scheduling moved to the job runner, and the FTP service never used sha512_crypt. --- Dockerfile | 2 +- backend/app/services/backup_service.py | 1 - backend/requirements.txt | 2 -- builtin-extensions/serverkit-ftp/backend/ftp_service.py | 1 - 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index df8a0189..f79de11d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -71,7 +71,7 @@ RUN pip install --no-cache-dir --upgrade pip \ # surfaces as a failed image build, never as a half-installed panel on a host. # # 1. Bundled test suites. Third-party packages ship their own pytest trees -# (passlib is the big one) that no running panel imports. +# that no running panel imports. # 2. botocore API models. botocore carries JSON models for 400+ AWS services # (~15 MB); ServerKit constructs exactly three clients — s3 # (storage_provider_service), route53 (dns_provider_service) and ses diff --git a/backend/app/services/backup_service.py b/backend/app/services/backup_service.py index bc3cce06..686bc645 100644 --- a/backend/app/services/backup_service.py +++ b/backend/app/services/backup_service.py @@ -10,7 +10,6 @@ from pathlib import Path import threading import time import uuid -import schedule from app import paths from app.utils import backup_crypto diff --git a/backend/requirements.txt b/backend/requirements.txt index 1e60587e..75e159a8 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -51,9 +51,7 @@ Flask-Limiter==3.5.0 # CLI click==8.3.3 -schedule==1.2.2 croniter==6.0.0 -passlib==1.7.4 bcrypt==4.2.1 # Encryption for env vars diff --git a/builtin-extensions/serverkit-ftp/backend/ftp_service.py b/builtin-extensions/serverkit-ftp/backend/ftp_service.py index 8770038b..32e49a2b 100644 --- a/builtin-extensions/serverkit-ftp/backend/ftp_service.py +++ b/builtin-extensions/serverkit-ftp/backend/ftp_service.py @@ -13,7 +13,6 @@ except ImportError: # Provide a Windows-compatible alternative here pwd = None #import crypt -from passlib.hash import sha512_crypt # Or your preferred hash scheme import platform import secrets from typing import Dict, List, Optional From 2521da0e4612389ab38b17e4b090b2dc6553d7eb Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 26 Oct 2026 11:16:21 -0400 Subject: [PATCH 023/171] Add an SSH Access server permission profile Faro access grants install keys through the agent's ssh:keys actions. A locked-down server had no canned profile for that short of Full Access; ssh_access grants ssh:keys:* plus the health reads. --- backend/app/api/servers.py | 11 +++++++++++ backend/tests/test_server_permissions.py | 13 +++++++++++++ 2 files changed, 24 insertions(+) diff --git a/backend/app/api/servers.py b/backend/app/api/servers.py index b106a860..b1c81b8e 100644 --- a/backend/app/api/servers.py +++ b/backend/app/api/servers.py @@ -191,6 +191,17 @@ PERMISSION_PROFILES = { 'survey:read', ] }, + 'ssh_access': { + 'name': 'SSH Access', + 'description': 'Add and remove authorized SSH keys (Faro access grants), plus health reads', + 'permissions': [ + 'ssh:keys:*', + 'system:metrics:read', + 'doctor:read', + 'systemd:read', + 'survey:read', + ] + }, 'full_access': { 'name': 'Full Access', 'description': 'All permissions including system commands', diff --git a/backend/tests/test_server_permissions.py b/backend/tests/test_server_permissions.py index d292b314..163237e4 100644 --- a/backend/tests/test_server_permissions.py +++ b/backend/tests/test_server_permissions.py @@ -80,3 +80,16 @@ def test_scoped_profiles_grant_fleet_doctor_scopes(): assert full.has_permission('doctor:probe') assert full.has_permission('systemd:restart') assert full.has_permission('cron:update') + + +def test_ssh_access_profile_allows_only_ssh_keys(): + """ssh_access lets an extension manage authorized_keys (ssh:keys:add / + remove / list) and nothing mutating beyond that.""" + from app.api.servers import PERMISSION_PROFILES + + server = Server(name='ssh', permissions=list(PERMISSION_PROFILES['ssh_access']['permissions'])) + for action in ('ssh:keys:add', 'ssh:keys:remove', 'ssh:keys:list'): + assert server.has_permission(action), action + assert server.has_permission('doctor:probe') + for action in ('system:exec', 'file:write', 'docker:container:create', 'systemd:restart'): + assert not server.has_permission(action), action From 2f41a9222f5943863594f3e0371806582f0d5826 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 2 Nov 2026 18:36:38 -0500 Subject: [PATCH 024/171] Re-sync bundled registry index with the published one --- backend/app/data/registry_index.json | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/backend/app/data/registry_index.json b/backend/app/data/registry_index.json index 5f7bb1b8..bcad9b64 100644 --- a/backend/app/data/registry_index.json +++ b/backend/app/data/registry_index.json @@ -1,6 +1,6 @@ { "schema_version": 3, - "updated": "2026-10-23", + "updated": "2026-10-28", "note": "Bundled fallback copy of the ServerKit extension registry index. The live index is fetched from SERVERKIT_REGISTRY_URL when configured; this file is used offline and in tests. It is a MIRROR of serverkit-extensions/index.json on main \u2014 do not hand-edit entries here, or it drifts from the artifacts it pins and installs fail checksum verification on exactly the panels that are already offline. Regenerate by copying that file's extensions array; tests/test_registry_bundled_index.py checks the two agree. Schema v3 adds optional per-entry `signature` + `publisher_key_id` (ed25519 minisign-style detached signature over the release zip, verified against the panel's pinned publisher keys at install \u2014 plan 55 D3). v1/v2 indexes without those fields remain valid; their entries are treated as unsigned.", "extensions": [ { @@ -299,7 +299,7 @@ "slug": "serverkit-wordpress", "display_name": "WordPress", "description": "The full WordPress suite: one-click site provisioning, a curated plugin library, environments and promote pipelines, update runs, security hardening, vulnerability scanning, analytics and reports. Offered during onboarding; uninstall it to slim the panel.", - "version": "1.0.4", + "version": "1.0.5", "category": "integration", "author": "ServerKit", "first_party": true, @@ -313,14 +313,14 @@ ], "min_panel_version": "1.11.18", "max_panel_version": null, - "source": "https://github.com/jhd3197/serverkit-wordpress/releases/download/v1.0.4/serverkit-wordpress-1.0.4.zip", - "sha256": "dd755d298c86eec4da9e55760718141a2fe0248067b63d13730a32c7643773cf", + "source": "https://github.com/jhd3197/serverkit-wordpress/releases/download/v1.0.5/serverkit-wordpress-1.0.5.zip", + "sha256": "f541d6a9077146470a212c79149df25806a77bbc5bebefb296bf8e1d1dfef74a", "repo": "https://github.com/jhd3197/serverkit-wordpress", "homepage": "https://github.com/jhd3197/serverkit-wordpress", "featured": true, "feature_score": 80, "logo": "assets/serverkit-wordpress/logo.png", - "signature": "RUSisf2r8uF4y2HOqYuZhdCDM07/Ft3TTMRCaJGbuGoUKPIlky587HkwFWe48XAm8DtPWAcIDUPMrBrHt86M7/A0yQ/Eb9qw7wA=", + "signature": "RUSisf2r8uF4ywWGOlXcW5biOIo140NvStZUiYr6N9bi4DIvkKbTu/7rDkNYnny9SvWGdrkqobVArkY89YDMIOuuQJKCYB0RYAs=", "publisher_key_id": "serverkit-official" }, { @@ -405,23 +405,27 @@ { "slug": "serverkit-faro", "display_name": "Faro", - "description": "One-click Open in Faro. Adds a Connect with Faro button to Services, Domains, and WordPress sites that opens the Faro desktop client prefilled to SFTP into that site's web root, via faro:// deep links. No credentials ever leave the panel: a link only prefills Faro's connection editor for the user to review and connect.", - "version": "1.0.2", + "description": "Open in Faro and SSH access sharing. Connect with Faro buttons open the Faro desktop client prefilled for SFTP via faro:// links, and the Access pages let you give people time-boxed, revocable key-based access to managed servers: one-time links, or members whose devices you add and approve. Keys are installed and removed through the agent, including on bridge hosts.", + "version": "1.2.0", "category": "utility", "author": "Juan Denis", "first_party": true, "bundled": false, - "permissions": [], - "min_panel_version": "1.7.0", + "permissions": [ + "db", + "agent.command:ssh:keys:add", + "agent.command:ssh:keys:remove" + ], + "min_panel_version": "1.11.17", "max_panel_version": null, - "source": "https://github.com/jhd3197/serverkit-faro/releases/download/v1.0.2/serverkit-faro-1.0.2.zip", - "sha256": "eba4a111bf7642fd4f72fbb491f78609f7663199d650950c21c88b706317f3b3", + "source": "https://github.com/jhd3197/serverkit-faro/releases/download/v1.2.0/serverkit-faro-1.2.0.zip", + "sha256": "b5bd467ecd86ccde6845b5e124590e12579d005f74ef92829a38afaefd1da196", "repo": "https://github.com/jhd3197/serverkit-faro", "homepage": "https://github.com/jhd3197/serverkit-faro", "featured": true, "feature_score": 100, "logo": "assets/serverkit-faro/logo.png", - "signature": "RUSisf2r8uF4y0SdTvSDNBJHsTbpWumcmG7a9B7SoOsmhOOL3GhhExZJ1jdQpp2AwrPBtnTvwSb3f8C1f+J9OpG+2SspaHjSqA8=", + "signature": "RUSisf2r8uF4y63Lt0ub3cpRFaQvADy4FHpguNWqyjZZzVDISkdA1B3fq6JNP+rbNyP4KVOIv08ahrJbhcx1Rffct9rRLmjD2gQ=", "publisher_key_id": "serverkit-official" }, { From d723d887e719f3fe3af2cf94152f4c402b61706e Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 2 Nov 2026 18:49:06 -0500 Subject: [PATCH 025/171] Bump Authlib to 1.9.1 --- backend/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/requirements.txt b/backend/requirements.txt index 75e159a8..9b13a7aa 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -71,7 +71,7 @@ requests==2.33.1 boto3==1.35.0 # SSO / OAuth -Authlib==1.6.12 +Authlib==1.9.1 python3-saml==1.16.0 # Cross-platform local IANA timezone resolution (SystemService.get_server_time From 5b0b0550fc4eda6d75ad8ca121faf14cba5e94c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 23:57:34 +0000 Subject: [PATCH 026/171] build(deps): bump marshmallow from 3.26.2 to 4.3.1 in /backend Bumps [marshmallow](https://github.com/marshmallow-code/marshmallow) from 3.26.2 to 4.3.1. - [Changelog](https://github.com/marshmallow-code/marshmallow/blob/dev/CHANGELOG.rst) - [Commits](https://github.com/marshmallow-code/marshmallow/compare/3.26.2...4.3.1) --- updated-dependencies: - dependency-name: marshmallow dependency-version: 4.3.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- backend/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/requirements.txt b/backend/requirements.txt index 9b13a7aa..d6b7afb8 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -81,7 +81,7 @@ tzlocal>=5.0 # OpenAPI documentation apispec==6.4.0 -marshmallow==3.26.2 +marshmallow==4.3.1 # AI assistant (core primitive — powered by Prompture) # Multi-provider LLM orchestration: Conversation, ToolRegistry, ask_live streaming, From 6b90776e5ab83e23415491523eaa2515910784ff Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 3 Nov 2026 00:03:26 +0000 Subject: [PATCH 027/171] chore: bump version to 1.11.28 [skip ci] --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 32bf4405..8007408d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.11.27 +1.11.28 From 5d8328ce9298a54e29ff441c66d59a6ec7a0910f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 3 Nov 2026 00:11:32 +0000 Subject: [PATCH 028/171] chore: bump version to 1.11.29 [skip ci] --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 8007408d..29f6e32c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.11.28 +1.11.29 From 07c0d7d4e3b19c6702993d29f475d145a2994ee1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2026 00:33:41 +0000 Subject: [PATCH 029/171] build(deps): bump gunicorn from 23.0.0 to 26.2.0 in /backend Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 23.0.0 to 26.2.0. - [Release notes](https://github.com/benoitc/gunicorn/releases) - [Commits](https://github.com/benoitc/gunicorn/compare/23.0.0...26.2.0) --- updated-dependencies: - dependency-name: gunicorn dependency-version: 26.2.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- backend/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/requirements.txt b/backend/requirements.txt index d6b7afb8..425b9747 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -35,7 +35,7 @@ psutil==5.9.7 # threading driver) under a plain threaded gunicorn worker — do NOT deploy # with the gevent-websocket worker class; it double-answers the WS handshake # against async_mode='threading' (browser: "Invalid frame header"). -gunicorn==23.0.0 +gunicorn==26.2.0 simple-websocket==1.1.0 # Environment variables From 67a2e972db20b3cd3c6608a11ebf9356db618627 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2026 00:42:50 +0000 Subject: [PATCH 030/171] build(deps): bump websockets from 15.0.1 to 16.1.1 in /backend Bumps [websockets](https://github.com/python-websockets/websockets) from 15.0.1 to 16.1.1. - [Release notes](https://github.com/python-websockets/websockets/releases) - [Commits](https://github.com/python-websockets/websockets/compare/15.0.1...16.1.1) --- updated-dependencies: - dependency-name: websockets dependency-version: 16.1.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- backend/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/requirements.txt b/backend/requirements.txt index 425b9747..8f4993c6 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -26,7 +26,7 @@ python-socketio==5.16.3 python-engineio==4.13.3 # WebSocket CLIENT for the ServerKit Cloud relay (see # app/services/connect_client.py). The server-side stack above cannot dial out. -websockets==15.0.1 +websockets==16.1.1 # System monitoring psutil==5.9.7 From b54241c2b1abe67f20b0e57f378a0434c2c3952b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 3 Nov 2026 00:48:54 +0000 Subject: [PATCH 031/171] chore: bump version to 1.11.30 [skip ci] --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 29f6e32c..eaedb22c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.11.29 +1.11.30 From 66c271a53076f57c9fa1a060639a38a64fe57962 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2026 00:52:04 +0000 Subject: [PATCH 032/171] build(deps): bump the backend group across 1 directory with 17 updates Bumps the backend group with 17 updates in the /backend directory: | Package | From | To | | --- | --- | --- | | [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) | `2.0.52` | `2.0.55` | | [flask-migrate](https://github.com/miguelgrinberg/flask-migrate) | `4.0.7` | `4.1.0` | | [flask-jwt-extended](https://github.com/vimalloc/flask-jwt-extended) | `4.6.0` | `4.7.4` | | [flask-cors](https://github.com/corydolphin/flask-cors) | `6.0.2` | `6.0.5` | | [flask-socketio](https://code.miguelgrinberg.com/miguelgrinberg/flask-socketio) | `5.6.1` | `5.7.0` | | [python-socketio](https://github.com/sponsors/miguelgrinberg) | `5.16.3` | `5.17.1` | | [python-engineio](https://code.miguelgrinberg.com/miguelgrinberg/python-engineio) | `4.13.3` | `4.15.1` | | [python-dotenv](https://github.com/theskumar/python-dotenv) | `1.2.2` | `1.2.4` | | [pyyaml](https://github.com/yaml/pyyaml) | `6.0.1` | `6.0.3` | | [click](https://github.com/pallets/click) | `8.3.3` | `8.5.0` | | [croniter](https://github.com/pallets-eco/croniter) | `6.0.0` | `6.2.4` | | [cryptography](https://github.com/pyca/cryptography) | `50.0.0` | `50.0.2` | | [pyotp](https://github.com/pyauth/pyotp) | `2.9.0` | `2.10.0` | | [requests](https://github.com/psf/requests) | `2.33.1` | `2.34.2` | | [boto3](https://github.com/boto/boto3) | `1.35.0` | `1.43.123` | | [apispec](https://github.com/marshmallow-code/apispec) | `6.4.0` | `6.10.0` | | [prompture](https://github.com/jhd3197/prompture) | `1.11.0` | `1.16.0` | Updates `sqlalchemy` from 2.0.52 to 2.0.55 - [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases) - [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES.rst) - [Commits](https://github.com/sqlalchemy/sqlalchemy/commits) Updates `flask-migrate` from 4.0.7 to 4.1.0 - [Release notes](https://github.com/miguelgrinberg/flask-migrate/releases) - [Changelog](https://github.com/miguelgrinberg/Flask-Migrate/blob/main/CHANGES.md) - [Commits](https://github.com/miguelgrinberg/flask-migrate/compare/v4.0.7...v4.1.0) Updates `flask-jwt-extended` from 4.6.0 to 4.7.4 - [Release notes](https://github.com/vimalloc/flask-jwt-extended/releases) - [Commits](https://github.com/vimalloc/flask-jwt-extended/compare/4.6.0...4.7.4) Updates `flask-cors` from 6.0.2 to 6.0.5 - [Release notes](https://github.com/corydolphin/flask-cors/releases) - [Changelog](https://github.com/corydolphin/flask-cors/blob/main/CHANGELOG.md) - [Commits](https://github.com/corydolphin/flask-cors/compare/6.0.2...6.0.5) Updates `flask-socketio` from 5.6.1 to 5.7.0 Updates `python-socketio` from 5.16.3 to 5.17.1 - [Commits](https://github.com/sponsors/miguelgrinberg/commits) Updates `python-engineio` from 4.13.3 to 4.15.1 Updates `python-dotenv` from 1.2.2 to 1.2.4 - [Release notes](https://github.com/theskumar/python-dotenv/releases) - [Changelog](https://github.com/theskumar/python-dotenv/blob/main/CHANGELOG.md) - [Commits](https://github.com/theskumar/python-dotenv/compare/v1.2.2...v1.2.4) Updates `pyyaml` from 6.0.1 to 6.0.3 - [Release notes](https://github.com/yaml/pyyaml/releases) - [Changelog](https://github.com/yaml/pyyaml/blob/6.0.3/CHANGES) - [Commits](https://github.com/yaml/pyyaml/compare/6.0.1...6.0.3) Updates `click` from 8.3.3 to 8.5.0 - [Release notes](https://github.com/pallets/click/releases) - [Changelog](https://github.com/pallets/click/blob/main/CHANGES.md) - [Commits](https://github.com/pallets/click/compare/8.3.3...8.5.0) Updates `croniter` from 6.0.0 to 6.2.4 - [Release notes](https://github.com/pallets-eco/croniter/releases) - [Changelog](https://github.com/pallets-eco/croniter/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pallets-eco/croniter/compare/6.0.0...6.2.4) Updates `cryptography` from 50.0.0 to 50.0.2 - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/50.0.0...50.0.2) Updates `pyotp` from 2.9.0 to 2.10.0 - [Release notes](https://github.com/pyauth/pyotp/releases) - [Changelog](https://github.com/pyauth/pyotp/blob/main/Changes.rst) - [Commits](https://github.com/pyauth/pyotp/compare/v2.9.0...v2.10.0) Updates `requests` from 2.33.1 to 2.34.2 - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](https://github.com/psf/requests/compare/v2.33.1...v2.34.2) Updates `boto3` from 1.35.0 to 1.43.123 - [Release notes](https://github.com/boto/boto3/releases) - [Commits](https://github.com/boto/boto3/compare/1.35.0...1.43.123) Updates `apispec` from 6.4.0 to 6.10.0 - [Changelog](https://github.com/marshmallow-code/apispec/blob/dev/CHANGELOG.rst) - [Commits](https://github.com/marshmallow-code/apispec/compare/6.4.0...6.10.0) Updates `prompture` from 1.11.0 to 1.16.0 - [Release notes](https://github.com/jhd3197/prompture/releases) - [Commits](https://github.com/jhd3197/prompture/compare/v1.11.0...v1.16.0) --- updated-dependencies: - dependency-name: apispec dependency-version: 6.10.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend - dependency-name: boto3 dependency-version: 1.43.123 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend - dependency-name: click dependency-version: 8.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend - dependency-name: croniter dependency-version: 6.2.4 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend - dependency-name: cryptography dependency-version: 50.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: backend - dependency-name: flask-cors dependency-version: 6.0.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: backend - dependency-name: flask-jwt-extended dependency-version: 4.7.4 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend - dependency-name: flask-migrate dependency-version: 4.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend - dependency-name: flask-socketio dependency-version: 5.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend - dependency-name: prompture dependency-version: 1.16.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend - dependency-name: pyotp dependency-version: 2.10.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend - dependency-name: python-dotenv dependency-version: 1.2.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: backend - dependency-name: python-engineio dependency-version: 4.15.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend - dependency-name: python-socketio dependency-version: 5.17.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend - dependency-name: pyyaml dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: backend - dependency-name: requests dependency-version: 2.34.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend - dependency-name: sqlalchemy dependency-version: 2.0.55 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: backend ... Signed-off-by: dependabot[bot] --- backend/requirements.txt | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/backend/requirements.txt b/backend/requirements.txt index 8f4993c6..901852fe 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -10,20 +10,20 @@ Flask-SQLAlchemy==3.1.1 # attributes and SQLAlchemy's TypingOnly guard rejected them. Debian 13 ships # only 3.13, so this pin is what lets the panel install there at all. # Verified: 3542 passed / 0 failed on 3.11 with 2.0.52, identical to 2.0.23. -SQLAlchemy==2.0.52 -Flask-Migrate==4.0.7 +SQLAlchemy==2.0.55 +Flask-Migrate==4.1.0 # Authentication -Flask-JWT-Extended==4.6.0 +Flask-JWT-Extended==4.7.4 PyJWT==2.15.1 # CORS -Flask-Cors==6.0.2 +Flask-Cors==6.0.5 # WebSocket support -Flask-SocketIO==5.6.1 -python-socketio==5.16.3 -python-engineio==4.13.3 +Flask-SocketIO==5.7.0 +python-socketio==5.17.1 +python-engineio==4.15.1 # WebSocket CLIENT for the ServerKit Cloud relay (see # app/services/connect_client.py). The server-side stack above cannot dial out. websockets==16.1.1 @@ -39,36 +39,36 @@ gunicorn==26.2.0 simple-websocket==1.1.0 # Environment variables -python-dotenv==1.2.2 +python-dotenv==1.2.4 # YAML / TOML parsing (for Docker Compose and repository manifests) -PyYAML==6.0.1 +PyYAML==6.0.3 tomli>=2.0.0; python_version < '3.11' # Rate limiting Flask-Limiter==3.5.0 # CLI -click==8.3.3 +click==8.5.0 -croniter==6.0.0 +croniter==6.2.4 bcrypt==4.2.1 # Encryption for env vars -cryptography==50.0.0 +cryptography==50.0.2 # Two-Factor Authentication -pyotp==2.9.0 +pyotp==2.10.0 qrcode[pil]==7.4.2 # WebAuthn / Passkeys webauthn==2.5.0 # HTTP Requests (for webhooks & notifications) -requests==2.33.1 +requests==2.34.2 # S3-compatible storage (AWS S3, Backblaze B2, MinIO, Wasabi) -boto3==1.35.0 +boto3==1.43.123 # SSO / OAuth Authlib==1.9.1 @@ -80,7 +80,7 @@ python3-saml==1.16.0 tzlocal>=5.0 # OpenAPI documentation -apispec==6.4.0 +apispec==6.10.0 marshmallow==4.3.1 # AI assistant (core primitive — powered by Prompture) @@ -88,4 +88,4 @@ marshmallow==4.3.1 # ProviderEnvironment, guardrails. Native OpenAI and Anthropic SDKs ship with the # panel; compatible gateways use Prompture's raw-HTTP driver. Other SDKs remain # optional. Pin the tested descriptor, streaming, and conversation APIs. -prompture[openai,anthropic]==1.11.0 +prompture[openai,anthropic]==1.16.0 From d32cfac616af13a84ad2265cc16a4fd8cfd61a5a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 3 Nov 2026 00:56:59 +0000 Subject: [PATCH 033/171] chore: bump version to 1.11.31 [skip ci] --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index eaedb22c..a8025b5f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.11.30 +1.11.31 From 29a967a6e36b069f7798f4714fe19494d1c9e211 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2026 01:00:50 +0000 Subject: [PATCH 034/171] build(deps): bump bcrypt from 4.2.1 to 5.0.0 in /backend Bumps [bcrypt](https://github.com/pyca/bcrypt) from 4.2.1 to 5.0.0. - [Changelog](https://github.com/pyca/bcrypt/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/bcrypt/compare/4.2.1...5.0.0) --- updated-dependencies: - dependency-name: bcrypt dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- backend/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/requirements.txt b/backend/requirements.txt index 901852fe..3b14528f 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -52,7 +52,7 @@ Flask-Limiter==3.5.0 click==8.5.0 croniter==6.2.4 -bcrypt==4.2.1 +bcrypt==5.0.0 # Encryption for env vars cryptography==50.0.2 From fe0aa4c02c0ea8ce66335db60bca23cea827fefb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 3 Nov 2026 01:07:17 +0000 Subject: [PATCH 035/171] chore: bump version to 1.11.32 [skip ci] --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index a8025b5f..64baaa56 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.11.31 +1.11.32 From 0a5c0bc27abb2cfdd84c7e7b06569953dd7dcf26 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2026 01:09:55 +0000 Subject: [PATCH 036/171] build(deps): bump the actions group across 1 directory with 9 updates Bumps the actions group with 9 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `4` | `7` | | [actions/setup-python](https://github.com/actions/setup-python) | `5` | `7` | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4` | `7` | | [actions/setup-node](https://github.com/actions/setup-node) | `4` | `7` | | [actions/download-artifact](https://github.com/actions/download-artifact) | `4` | `8` | | [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3` | `4` | | [docker/build-push-action](https://github.com/docker/build-push-action) | `5` | `7` | | [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `3` | `4` | | [docker/login-action](https://github.com/docker/login-action) | `3` | `4` | Updates `actions/checkout` from 4 to 7 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v7) Updates `actions/setup-python` from 5 to 7 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v5...v7) Updates `actions/upload-artifact` from 4 to 7 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v7) Updates `actions/setup-node` from 4 to 7 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v4...v7) Updates `actions/download-artifact` from 4 to 8 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v4...v8) Updates `docker/setup-buildx-action` from 3 to 4 - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v3...v4) Updates `docker/build-push-action` from 5 to 7 - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v5...v7) Updates `docker/setup-qemu-action` from 3 to 4 - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/v3...v4) Updates `docker/login-action` from 3 to 4 - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/download-artifact dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/setup-node dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/setup-python dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: docker/build-push-action dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: docker/login-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: docker/setup-buildx-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: docker/setup-qemu-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] --- .github/workflows/backend-ci.yml | 16 ++++++------- .../distro-compatibility-discovery.yml | 4 ++-- .github/workflows/extensions-ci.yml | 4 ++-- .github/workflows/frontend-ci.yml | 6 ++--- .github/workflows/measurements-ci.yml | 4 ++-- .github/workflows/release-smoke.yml | 14 +++++------ .github/workflows/release.yml | 24 +++++++++---------- .github/workflows/scripts-ci.yml | 14 +++++------ .github/workflows/scripts-nightly.yml | 8 +++---- .github/workflows/security-scan.yml | 16 ++++++------- .github/workflows/test-system-utils.yml | 6 ++--- .github/workflows/version-bump.yml | 2 +- 12 files changed, 59 insertions(+), 59 deletions(-) diff --git a/.github/workflows/backend-ci.yml b/.github/workflows/backend-ci.yml index d400e978..7762b30d 100644 --- a/.github/workflows/backend-ci.yml +++ b/.github/workflows/backend-ci.yml @@ -29,8 +29,8 @@ jobs: name: test-count ratchet runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v7 + - uses: actions/setup-python@v7 with: python-version: '3.11' cache: pip @@ -82,8 +82,8 @@ jobs: matrix: group: [1, 2, 3, 4] steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v7 + - uses: actions/setup-python@v7 with: python-version: '3.11' cache: pip @@ -115,8 +115,8 @@ jobs: name: real binaries runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v7 + - uses: actions/setup-python@v7 with: python-version: '3.11' cache: pip @@ -149,8 +149,8 @@ jobs: name: docker builds runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v7 + - uses: actions/setup-python@v7 with: python-version: '3.11' cache: pip diff --git a/.github/workflows/distro-compatibility-discovery.yml b/.github/workflows/distro-compatibility-discovery.yml index 15a05090..5e0901bc 100644 --- a/.github/workflows/distro-compatibility-discovery.yml +++ b/.github/workflows/distro-compatibility-discovery.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 120 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Run exact and proxy image probes run: >- @@ -35,7 +35,7 @@ jobs: - name: Upload detailed evidence if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: distro-compatibility-report path: scripts/test/output/distro-compatibility/ diff --git a/.github/workflows/extensions-ci.yml b/.github/workflows/extensions-ci.yml index b0a8289d..b6572486 100644 --- a/.github/workflows/extensions-ci.yml +++ b/.github/workflows/extensions-ci.yml @@ -28,8 +28,8 @@ jobs: name: builtin frontend drift check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v7 + - uses: actions/setup-node@v7 with: node-version: '22' - name: Check builtin-extension frontends are in sync diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml index ca928566..e186b433 100644 --- a/.github/workflows/frontend-ci.yml +++ b/.github/workflows/frontend-ci.yml @@ -29,8 +29,8 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v7 + - uses: actions/setup-node@v7 with: node-version: '22' cache: npm @@ -91,7 +91,7 @@ jobs: run: npm run test:ai-operations - name: Upload Settings screenshots if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: settings-browser-screenshots path: frontend/test-results/ diff --git a/.github/workflows/measurements-ci.yml b/.github/workflows/measurements-ci.yml index 216c3bde..907d7885 100644 --- a/.github/workflows/measurements-ci.yml +++ b/.github/workflows/measurements-ci.yml @@ -38,8 +38,8 @@ jobs: measurements: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v7 + - uses: actions/setup-python@v7 with: python-version: '3.11' - name: Test measurement tools (stdlib only) diff --git a/.github/workflows/release-smoke.yml b/.github/workflows/release-smoke.yml index e8948ab1..7f87cc49 100644 --- a/.github/workflows/release-smoke.yml +++ b/.github/workflows/release-smoke.yml @@ -54,7 +54,7 @@ jobs: dev_tag: ${{ steps.dev.outputs.tag }} steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: persist-credentials: false @@ -73,7 +73,7 @@ jobs: echo "Dev build: v$version" - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v7 with: node-version: '22' @@ -89,7 +89,7 @@ jobs: - name: Save the dev release files if: github.event_name == 'push' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: dev-release path: | @@ -108,7 +108,7 @@ jobs: steps: # No checkout or repository scripts run with the write token. - name: Download the built release files - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: dev-release @@ -157,13 +157,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Build image (amd64) - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v7 with: context: . platforms: linux/amd64 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 70d42507..61cfb9a1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -77,7 +77,7 @@ jobs: tag: ${{ steps.version.outputs.tag }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: fetch-depth: 0 @@ -130,10 +130,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v7 with: node-version: '22' @@ -148,7 +148,7 @@ jobs: run: bash scripts/build-release.sh - name: Upload release artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: serverkit-release-${{ matrix.arch }} path: | @@ -163,16 +163,16 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Login to Docker Hub - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -186,7 +186,7 @@ jobs: # catches that. The layers are cached, so the multi-arch push below reuses # this build rather than repeating it. - name: Build amd64 image for smoke test - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v7 with: context: . platforms: linux/amd64 @@ -204,7 +204,7 @@ jobs: run: SKIP_BUILD=1 bash scripts/test/smoke-docker-image.sh serverkit:smoke - name: Build and push Docker image - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v7 with: context: . platforms: linux/amd64,linux/arm64 @@ -227,10 +227,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Download release artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: path: release-artifacts pattern: serverkit-release-* diff --git a/.github/workflows/scripts-ci.yml b/.github/workflows/scripts-ci.yml index 53b0de86..1d944148 100644 --- a/.github/workflows/scripts-ci.yml +++ b/.github/workflows/scripts-ci.yml @@ -44,7 +44,7 @@ jobs: name: lint + unit runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Syntax check (bash -n) run: | @@ -123,7 +123,7 @@ jobs: - 'fedora:40' - 'opensuse/leap:15.5' steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Pull ${{ matrix.image }} (Docker Hub, then mirror) env: @@ -209,7 +209,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Run probe matrix run: bash scripts/test/probe-matrix.sh @@ -241,7 +241,7 @@ jobs: - 'fedora:40' - 'opensuse/leap:15.5' steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: provision_python on ${{ matrix.image }} run: | @@ -265,7 +265,7 @@ jobs: # fails here instead of on someone's Pi. Real-hardware validation (GPIO, # SD-card I/O, 32-bit ARM) still needs a physical device. steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: bash -n + unit suites on arm64 run: | set -e @@ -294,7 +294,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 45 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Install ServerKit (non-interactive, no domain, plain HTTP) run: | @@ -380,7 +380,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: ShellCheck --enable=all (advisory — never fails the build) continue-on-error: true diff --git a/.github/workflows/scripts-nightly.yml b/.github/workflows/scripts-nightly.yml index f9e5e807..adeb83ac 100644 --- a/.github/workflows/scripts-nightly.yml +++ b/.github/workflows/scripts-nightly.yml @@ -43,7 +43,7 @@ jobs: timeout-minutes: 10 steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Verify the agent release chain run: bash scripts/test/verify-agent-release-chain.sh @@ -63,10 +63,10 @@ jobs: timeout-minutes: 45 steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v7 with: node-version: '22' @@ -143,7 +143,7 @@ jobs: timeout-minutes: 60 steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Install the latest published release (baseline) id: baseline diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml index 87a2e6ec..b4ebcade 100644 --- a/.github/workflows/security-scan.yml +++ b/.github/workflows/security-scan.yml @@ -37,9 +37,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v7 with: python-version: '3.11' @@ -54,7 +54,7 @@ jobs: - name: Upload full Bandit report if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: bandit-report path: bandit-report.json @@ -76,9 +76,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v7 with: python-version: '3.11' @@ -105,8 +105,8 @@ jobs: name: Frontend Production Dependency Scan runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v7 + - uses: actions/setup-node@v7 with: node-version: '22' cache: npm @@ -133,7 +133,7 @@ jobs: continue-on-error: true steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Run Safety CLI to check for vulnerabilities continue-on-error: true diff --git a/.github/workflows/test-system-utils.yml b/.github/workflows/test-system-utils.yml index b60e9c47..17ee1db8 100644 --- a/.github/workflows/test-system-utils.yml +++ b/.github/workflows/test-system-utils.yml @@ -56,7 +56,7 @@ jobs: DEBIAN_FRONTEND: noninteractive steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Install Python & pytest shell: bash @@ -86,10 +86,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: python-version: '3.11' diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index c1c7b95f..5277693b 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -23,7 +23,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: fetch-depth: 0 token: ${{ secrets.GITHUB_TOKEN }} From 1cc26e3865f260372e76326ce02db428fb131eb4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 3 Nov 2026 01:14:58 +0000 Subject: [PATCH 037/171] chore: bump version to 1.11.33 [skip ci] --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 64baaa56..e043124c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.11.32 +1.11.33 From 7f77b1c239228ed89d52aa68ada0385d87c30546 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2026 01:21:14 +0000 Subject: [PATCH 038/171] build(deps): bump the frontend group across 1 directory with 26 updates Bumps the frontend group with 26 updates in the /frontend directory: | Package | From | To | | --- | --- | --- | | [@radix-ui/react-alert-dialog](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/alert-dialog) | `1.1.15` | `1.2.1` | | [@radix-ui/react-checkbox](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/checkbox) | `1.3.3` | `1.4.1` | | [@radix-ui/react-dialog](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/dialog) | `1.1.15` | `1.3.1` | | [@radix-ui/react-dropdown-menu](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/dropdown-menu) | `2.1.16` | `2.2.1` | | [@radix-ui/react-label](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/label) | `2.1.8` | `2.1.17` | | [@radix-ui/react-popover](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/popover) | `1.1.15` | `1.3.1` | | [@radix-ui/react-select](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/select) | `2.2.6` | `2.4.1` | | [@radix-ui/react-slot](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/slot) | `1.2.4` | `1.5.0` | | [@radix-ui/react-switch](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/switch) | `1.2.6` | `1.4.1` | | [@radix-ui/react-tabs](https://github.com/radix-ui/primitives/tree/HEAD/packages/react/tabs) | `1.1.13` | `1.2.1` | | [@xterm/addon-fit](https://github.com/xtermjs/xterm.js) | `0.10.0` | `0.11.0` | | [@xterm/addon-web-links](https://github.com/xtermjs/xterm.js) | `0.11.0` | `0.12.0` | | [@xyflow/react](https://github.com/xyflow/xyflow/tree/HEAD/packages/react) | `12.10.0` | `12.12.0` | | [i18next](https://github.com/i18next/i18next) | `26.3.6` | `26.5.12` | | [react-i18next](https://github.com/i18next/react-i18next) | `17.0.11` | `17.1.9` | | [react-icons](https://github.com/react-icons/react-icons) | `5.6.0` | `5.7.0` | | [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) | `7.18.2` | `7.18.5` | | [socket.io-client](https://github.com/socketio/socket.io) | `4.8.3` | `4.8.4` | | [sonner](https://github.com/emilkowalski/sonner) | `2.0.7` | `2.0.8` | | [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react) | `6.0.3` | `6.1.2` | | [boneyard-js](https://github.com/0xGF/boneyard) | `1.9.0` | `1.10.0` | | [eslint-plugin-react-refresh](https://github.com/ArnaudBarre/eslint-plugin-react-refresh) | `0.4.26` | `0.5.7` | | [playwright](https://github.com/microsoft/playwright) | `1.61.1` | `1.64.1` | | [sass](https://github.com/sass/dart-sass) | `1.98.0` | `1.107.1` | | [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `8.1.4` | `8.3.5` | | [@rollup/rollup-win32-x64-msvc](https://github.com/rollup/rollup) | `4.62.2` | `4.67.2` | Updates `@radix-ui/react-alert-dialog` from 1.1.15 to 1.2.1 - [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/alert-dialog/CHANGELOG.md) - [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/alert-dialog) Updates `@radix-ui/react-checkbox` from 1.3.3 to 1.4.1 - [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/checkbox/CHANGELOG.md) - [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/checkbox) Updates `@radix-ui/react-dialog` from 1.1.15 to 1.3.1 - [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/dialog/CHANGELOG.md) - [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/dialog) Updates `@radix-ui/react-dropdown-menu` from 2.1.16 to 2.2.1 - [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/dropdown-menu/CHANGELOG.md) - [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/dropdown-menu) Updates `@radix-ui/react-label` from 2.1.8 to 2.1.17 - [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/label/CHANGELOG.md) - [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/label) Updates `@radix-ui/react-popover` from 1.1.15 to 1.3.1 - [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/popover/CHANGELOG.md) - [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/popover) Updates `@radix-ui/react-select` from 2.2.6 to 2.4.1 - [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/select/CHANGELOG.md) - [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/select) Updates `@radix-ui/react-slot` from 1.2.4 to 1.5.0 - [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/slot/CHANGELOG.md) - [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/slot) Updates `@radix-ui/react-switch` from 1.2.6 to 1.4.1 - [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/switch/CHANGELOG.md) - [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/switch) Updates `@radix-ui/react-tabs` from 1.1.13 to 1.2.1 - [Changelog](https://github.com/radix-ui/primitives/blob/main/packages/react/tabs/CHANGELOG.md) - [Commits](https://github.com/radix-ui/primitives/commits/HEAD/packages/react/tabs) Updates `@xterm/addon-fit` from 0.10.0 to 0.11.0 - [Release notes](https://github.com/xtermjs/xterm.js/releases) - [Commits](https://github.com/xtermjs/xterm.js/compare/0.10...0.11) Updates `@xterm/addon-web-links` from 0.11.0 to 0.12.0 - [Release notes](https://github.com/xtermjs/xterm.js/releases) - [Commits](https://github.com/xtermjs/xterm.js/compare/0.11...0.12) Updates `@xyflow/react` from 12.10.0 to 12.12.0 - [Release notes](https://github.com/xyflow/xyflow/releases) - [Changelog](https://github.com/xyflow/xyflow/blob/main/packages/react/CHANGELOG.md) - [Commits](https://github.com/xyflow/xyflow/commits/@xyflow/react@12.12.0/packages/react) Updates `i18next` from 26.3.6 to 26.5.12 - [Release notes](https://github.com/i18next/i18next/releases) - [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md) - [Commits](https://github.com/i18next/i18next/compare/v26.3.6...v26.5.12) Updates `react-i18next` from 17.0.11 to 17.1.9 - [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md) - [Commits](https://github.com/i18next/react-i18next/compare/v17.0.11...v17.1.9) Updates `react-icons` from 5.6.0 to 5.7.0 - [Release notes](https://github.com/react-icons/react-icons/releases) - [Commits](https://github.com/react-icons/react-icons/compare/v5.6.0...v5.7.0) Updates `react-router-dom` from 7.18.2 to 7.18.5 - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/react-router-dom@7.18.5/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@7.18.5/packages/react-router-dom) Updates `socket.io-client` from 4.8.3 to 4.8.4 - [Release notes](https://github.com/socketio/socket.io/releases) - [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md) - [Commits](https://github.com/socketio/socket.io/compare/socket.io-client@4.8.3...socket.io-client@4.8.4) Updates `sonner` from 2.0.7 to 2.0.8 - [Release notes](https://github.com/emilkowalski/sonner/releases) - [Commits](https://github.com/emilkowalski/sonner/compare/v2.0.7...v2.0.8) Updates `@vitejs/plugin-react` from 6.0.3 to 6.1.2 - [Release notes](https://github.com/vitejs/vite-plugin-react/releases) - [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite-plugin-react/commits/plugin-react@6.1.2/packages/plugin-react) Updates `boneyard-js` from 1.9.0 to 1.10.0 - [Release notes](https://github.com/0xGF/boneyard/releases) - [Commits](https://github.com/0xGF/boneyard/compare/v1.9.0...v1.10.0) Updates `eslint-plugin-react-refresh` from 0.4.26 to 0.5.7 - [Release notes](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/releases) - [Changelog](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/blob/main/CHANGELOG.md) - [Commits](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/compare/v0.4.26...v0.5.7) Updates `playwright` from 1.61.1 to 1.64.1 - [Release notes](https://github.com/microsoft/playwright/releases) - [Commits](https://github.com/microsoft/playwright/compare/v1.61.1...v1.64.1) Updates `sass` from 1.98.0 to 1.107.1 - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.98.0...1.107.1) Updates `vite` from 8.1.4 to 8.3.5 - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v8.3.5/packages/vite) Updates `@rollup/rollup-win32-x64-msvc` from 4.62.2 to 4.67.2 - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.62.2...v4.67.2) --- updated-dependencies: - dependency-name: "@radix-ui/react-alert-dialog" dependency-version: 1.1.24 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: frontend - dependency-name: "@radix-ui/react-checkbox" dependency-version: 1.3.12 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: frontend - dependency-name: "@radix-ui/react-dialog" dependency-version: 1.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: frontend - dependency-name: "@radix-ui/react-dropdown-menu" dependency-version: 2.1.25 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: frontend - dependency-name: "@radix-ui/react-label" dependency-version: 2.1.16 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: frontend - dependency-name: "@radix-ui/react-popover" dependency-version: 1.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: frontend - dependency-name: "@radix-ui/react-select" dependency-version: 2.3.8 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: frontend - dependency-name: "@radix-ui/react-slot" dependency-version: 1.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: frontend - dependency-name: "@radix-ui/react-switch" dependency-version: 1.3.8 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: frontend - dependency-name: "@radix-ui/react-tabs" dependency-version: 1.1.22 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: frontend - dependency-name: "@rollup/rollup-win32-x64-msvc" dependency-version: 4.64.3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: frontend - dependency-name: "@vitejs/plugin-react" dependency-version: 6.1.2 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: frontend - dependency-name: "@xterm/addon-fit" dependency-version: 0.11.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: frontend - dependency-name: "@xterm/addon-web-links" dependency-version: 0.12.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: frontend - dependency-name: "@xyflow/react" dependency-version: 12.12.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: frontend - dependency-name: boneyard-js dependency-version: 1.10.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: frontend - dependency-name: eslint-plugin-react-refresh dependency-version: 0.5.7 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: frontend - dependency-name: i18next dependency-version: 26.4.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: frontend - dependency-name: playwright dependency-version: 1.64.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: frontend - dependency-name: react-i18next dependency-version: 17.0.16 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: frontend - dependency-name: react-icons dependency-version: 5.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: frontend - dependency-name: react-router-dom dependency-version: 7.18.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: frontend - dependency-name: sass dependency-version: 1.105.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: frontend - dependency-name: socket.io-client dependency-version: 4.8.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: frontend - dependency-name: sonner dependency-version: 2.0.8 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: frontend - dependency-name: vite dependency-version: 8.3.4 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: frontend ... Signed-off-by: dependabot[bot] --- frontend/package-lock.json | 2149 +++++++++--------------------------- frontend/package.json | 48 +- 2 files changed, 559 insertions(+), 1638 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 6d825a2e..3b4de467 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -8,53 +8,54 @@ "name": "serverkit-frontend", "version": "0.1.0", "dependencies": { - "@radix-ui/react-alert-dialog": "^1.1.15", - "@radix-ui/react-checkbox": "^1.3.3", + "@radix-ui/react-alert-dialog": "^1.2.1", + "@radix-ui/react-checkbox": "^1.4.1", "@radix-ui/react-dialog": "^1.1.15", - "@radix-ui/react-dropdown-menu": "^2.1.16", - "@radix-ui/react-label": "^2.1.8", - "@radix-ui/react-popover": "^1.1.15", + "@radix-ui/react-dropdown-menu": "^2.2.1", + "@radix-ui/react-label": "^2.1.17", + "@radix-ui/react-popover": "^1.3.1", "@radix-ui/react-radio-group": "^1.5.1", - "@radix-ui/react-select": "^2.2.6", + "@radix-ui/react-select": "^2.4.1", "@radix-ui/react-slider": "^1.6.1", "@radix-ui/react-slot": "^1.2.4", - "@radix-ui/react-switch": "^1.2.6", - "@radix-ui/react-tabs": "^1.1.13", + "@radix-ui/react-switch": "^1.4.1", + "@radix-ui/react-tabs": "^1.2.1", "@radix-ui/react-tooltip": "^1.4.1", - "@xterm/addon-fit": "^0.10.0", - "@xterm/addon-web-links": "^0.11.0", + "@rollup/rollup-win32-x64-msvc": "4.67.2", + "@xterm/addon-fit": "^0.11.0", + "@xterm/addon-web-links": "^0.12.0", "@xterm/xterm": "^5.5.0", - "@xyflow/react": "^12.10.0", + "@xyflow/react": "^12.12.0", "clsx": "^2.1.1", "cmdk": "^1.1.1", - "i18next": "^26.3.6", + "i18next": "^26.5.12", "lucide-react": "^0.363.0", "react": "^18.3.1", "react-dom": "^18.3.1", - "react-i18next": "^17.0.11", - "react-icons": "^5.6.0", - "react-router-dom": "^7.18.1", + "react-i18next": "^17.1.9", + "react-icons": "^5.7.0", + "react-router-dom": "^7.18.5", "recharts": "^2.12.3", - "socket.io-client": "^4.7.2", - "sonner": "^2.0.7" + "socket.io-client": "^4.8.4", + "sonner": "^2.0.8" }, "devDependencies": { "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", - "@vitejs/plugin-react": "^6.0.3", - "boneyard-js": "^1.9.0", + "@vitejs/plugin-react": "^6.1.2", + "boneyard-js": "^1.10.0", "eslint": "^9.9.0", "eslint-plugin-react": "^7.35.0", "eslint-plugin-react-hooks": "^5.1.0-rc.0", - "eslint-plugin-react-refresh": "^0.4.9", + "eslint-plugin-react-refresh": "^0.5.7", "espree": "^11.2.0", "globals": "^15.9.0", - "playwright": "1.61.1", - "sass": "^1.86.0", - "vite": "^8.1.4" + "playwright": "1.64.1", + "sass": "^1.107.1", + "vite": "^8.3.5" }, "optionalDependencies": { - "@rollup/rollup-win32-x64-msvc": "^4.62.2" + "@rollup/rollup-win32-x64-msvc": "^4.67.2" } }, "node_modules/@babel/runtime": { @@ -74,40 +75,6 @@ "license": "MIT", "optional": true }, - "node_modules/@emnapi/core": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz", - "integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/wasi-threads": "1.2.2", - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/runtime": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz", - "integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/wasi-threads": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", - "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.9.1", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", @@ -387,33 +354,14 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@napi-rs/wasm-runtime": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz", - "integrity": "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@tybys/wasm-util": "^0.10.3" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Brooooooklyn" - }, - "peerDependencies": { - "@emnapi/core": "^1.7.1", - "@emnapi/runtime": "^1.7.1" - } - }, "node_modules/@oxc-project/types": { - "version": "0.139.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.139.0.tgz", - "integrity": "sha512-r9gHphtCs+1M7J0pw6Sn/hh/Wpa/iQrOOkrNAlVLF/gHq+/CJmHIWKKUUhdWjcD6CIa8idarspCsASiXCXvFUw==", + "version": "0.156.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.156.0.tgz", + "integrity": "sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw==", "dev": true, "license": "MIT", "funding": { - "url": "https://github.com/sponsors/Boshen" + "url": "https://github.com/sponsors/oxc-project" } }, "node_modules/@parcel/watcher": { @@ -727,29 +675,28 @@ } }, "node_modules/@radix-ui/number": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.1.1.tgz", - "integrity": "sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.1.3.tgz", + "integrity": "sha512-Road2bidD0uu/1BGDOWNdPI06g0lIRy6IF9GZcIrDK2KGItfor8IQwQa+yM2ERgHM1MmHxaxpTzk0/Jp42lNfA==", "license": "MIT" }, "node_modules/@radix-ui/primitive": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.3.tgz", - "integrity": "sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.2.0.tgz", + "integrity": "sha512-KABY+VMIRPJL+Vyzv/335FEhXXD/xDv8BMb1kl48/aXJZMH0LtHCTx5ga5RnxaEP3nZHtmTLf1P9vanmFX46bw==", "license": "MIT" }, "node_modules/@radix-ui/react-alert-dialog": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/@radix-ui/react-alert-dialog/-/react-alert-dialog-1.1.15.tgz", - "integrity": "sha512-oTVLkEw5GpdRe29BqJ0LSDFWI3qu0vR1M0mUkOQWDIUnY/QIkLpgDMWuKxP94c2NAC2LGcgVhG1ImF3jkZ5wXw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-alert-dialog/-/react-alert-dialog-1.2.1.tgz", + "integrity": "sha512-MWC4N7RY+qsbNrFNo7yQ9ZbdoZEW+B5DtpWxJfUnVCqcQxxqqg3qis3RMPTDbCNaTIdHJSn5XDkl9ZdVWXknLg==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.3", - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-context": "1.1.2", - "@radix-ui/react-dialog": "1.1.15", - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-slot": "1.2.3" + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-dialog": "1.3.1", + "@radix-ui/react-primitive": "2.2.0" }, "peerDependencies": { "@types/react": "*", @@ -766,31 +713,13 @@ } } }, - "node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz", - "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.2" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-arrow": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.7.tgz", - "integrity": "sha512-F+M1tLhO+mlQaOWspE8Wstg+z6PwxwRd8oQ8IXceWz92kfAmalTRf0EjrouQeo7QssEPfCn05B4Ihs1K9WQ/7w==", + "version": "1.1.17", + "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.17.tgz", + "integrity": "sha512-67jjcVvxjXCCStnTW3Z+M7jmaFMuMR7M2JgpDzH4w7JSRrikmzhjfYgP/09ECb8n7whnsgh1ifJ+Ie96qEj+pQ==", "license": "MIT", "dependencies": { - "@radix-ui/react-primitive": "2.1.3" + "@radix-ui/react-primitive": "2.2.0" }, "peerDependencies": { "@types/react": "*", @@ -808,19 +737,18 @@ } }, "node_modules/@radix-ui/react-checkbox": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.3.3.tgz", - "integrity": "sha512-wBbpv+NQftHDdG86Qc0pIyXk5IR3tM8Vd0nWLKDcX8nNn4nXFOFwsKuqw2okA/1D/mpaAkmuyndrPJTYDNZtFw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.4.1.tgz", + "integrity": "sha512-KWtwhh+98ML3seZ9vO9yRY2OwaQG90dCiDAxjpSNY2AaZ3Hik3B0dsk6m0ILywo/no3A9/SozadyPMNweVT8yw==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.3", - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-context": "1.1.2", - "@radix-ui/react-presence": "1.1.5", - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-use-controllable-state": "1.2.2", - "@radix-ui/react-use-previous": "1.1.1", - "@radix-ui/react-use-size": "1.1.1" + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-size": "1.1.5" }, "peerDependencies": { "@types/react": "*", @@ -838,15 +766,16 @@ } }, "node_modules/@radix-ui/react-collection": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.7.tgz", - "integrity": "sha512-Fh9rGN0MoI4ZFUNyfFVNU4y9LUz93u9/0K+yLgA2bwRojxM8JU1DyvvMBabnZPBgMWREAJvU2jjVzq+LrFUglw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.2.0.tgz", + "integrity": "sha512-+yiQzqcc7Sy7/5s0jrMCjpPRFB3538VNrXPWdTLZhE/SCfgEws4aI6lHWN/vvcnyhHndROWBzqmqB4QBrITZ9Q==", "license": "MIT", "dependencies": { - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-context": "1.1.2", - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-slot": "1.2.3" + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-slot": "1.5.0", + "@radix-ui/react-use-layout-effect": "1.1.4" }, "peerDependencies": { "@types/react": "*", @@ -863,28 +792,10 @@ } } }, - "node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz", - "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.2" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-compose-refs": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz", - "integrity": "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.5.tgz", + "integrity": "sha512-+48PbAAbq3didjJxa+OaWY2ZwgAKsNiRGyeHKszblZMQ+kcpd9pAaT11cMkGEie0vsOi3QdeTE6d5Fe3Gn61kA==", "license": "MIT", "peerDependencies": { "@types/react": "*", @@ -897,9 +808,9 @@ } }, "node_modules/@radix-ui/react-context": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.2.tgz", - "integrity": "sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.3.0.tgz", + "integrity": "sha512-v5AYEocMISkbJ+1fTXzZpiFv7NRr3D2WiYbLIKf+FkmJ8VkP6d503eV2n34MFussHXY1pcoq3yfJiQH77dc4Mg==", "license": "MIT", "peerDependencies": { "@types/react": "*", @@ -912,25 +823,26 @@ } }, "node_modules/@radix-ui/react-dialog": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.15.tgz", - "integrity": "sha512-TCglVRtzlffRNxRMEyR36DGBLJpeusFcgMVD9PZEzAKnUs1lKCgX5u9BmC2Yg+LL9MgZDugFFs1Vl+Jp4t/PGw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.3.1.tgz", + "integrity": "sha512-+0E4qvVTwjAWra9sEhJ+9BTsvHE00zkUuNw1VGh7S+Gc13dfYk+S1PVQdchWDj+XYHhAai7Z7IpzXVDCGsDplg==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.3", - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-context": "1.1.2", - "@radix-ui/react-dismissable-layer": "1.1.11", - "@radix-ui/react-focus-guards": "1.1.3", - "@radix-ui/react-focus-scope": "1.1.7", - "@radix-ui/react-id": "1.1.1", - "@radix-ui/react-portal": "1.1.9", - "@radix-ui/react-presence": "1.1.5", - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-slot": "1.2.3", - "@radix-ui/react-use-controllable-state": "1.2.2", + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-dismissable-layer": "1.2.1", + "@radix-ui/react-focus-guards": "1.2.0", + "@radix-ui/react-focus-scope": "1.3.1", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-portal": "1.2.0", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-slot": "1.5.0", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-layout-effect": "1.1.4", "aria-hidden": "^1.2.4", - "react-remove-scroll": "^2.6.3" + "react-remove-scroll": "^2.7.2" }, "peerDependencies": { "@types/react": "*", @@ -947,28 +859,10 @@ } } }, - "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz", - "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.2" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-direction": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.1.tgz", - "integrity": "sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.2.0.tgz", + "integrity": "sha512-FtRA52a/r+LKStFT+neLUm+8vSe7wbzkbQGGeU8ixFiwC8NU14Evoq9ATECqL3eGbcUzJR4fyfA4KkK/q6dfqg==", "license": "MIT", "peerDependencies": { "@types/react": "*", @@ -981,16 +875,16 @@ } }, "node_modules/@radix-ui/react-dismissable-layer": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.11.tgz", - "integrity": "sha512-Nqcp+t5cTB8BinFkZgXiMJniQH0PsUt2k51FUhbdfeKvc4ACcG2uQniY/8+h1Yv6Kza4Q7lD7PQV0z0oicE0Mg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.2.1.tgz", + "integrity": "sha512-KIfDcAsx+oVylFZ4xryVKusJUrLLhTQmfnJW4kwk4Km5myvhHCrj04hnWWUC166+xD4DHdH8tQGylwYX1h6+Pg==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.3", - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-use-callback-ref": "1.1.1", - "@radix-ui/react-use-escape-keydown": "1.1.1" + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-callback-ref": "1.1.5", + "@radix-ui/react-use-effect-event": "0.0.5" }, "peerDependencies": { "@types/react": "*", @@ -1008,18 +902,18 @@ } }, "node_modules/@radix-ui/react-dropdown-menu": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.16.tgz", - "integrity": "sha512-1PLGQEynI/3OX/ftV54COn+3Sud/Mn8vALg2rWnBLnRaGtJDduNW/22XjlGgPdpcIbiQxjKtb7BkcjP00nqfJw==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.2.1.tgz", + "integrity": "sha512-XsHcmYG2AcqnvTqrOXXWcMrhquEIlqucizuDH1MV/qMRW+DndpBCMvNeTRXOxqmG1H5j89M/+I0/34Zdd+zDcQ==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.3", - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-context": "1.1.2", - "@radix-ui/react-id": "1.1.1", - "@radix-ui/react-menu": "2.1.16", - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-use-controllable-state": "1.2.2" + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-menu": "2.2.1", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-controllable-state": "1.3.0" }, "peerDependencies": { "@types/react": "*", @@ -1037,9 +931,9 @@ } }, "node_modules/@radix-ui/react-focus-guards": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.3.tgz", - "integrity": "sha512-0rFg/Rj2Q62NCm62jZw0QX7a3sz6QCQU0LpZdNrJX8byRGaGVTqbrW9jAoIAHyMQqsNpeZ81YgSizOt5WXq0Pw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.2.0.tgz", + "integrity": "sha512-MPm5R0iRGUDrDnPNxmLBkv+X7pN4XKzt+MbWJEuJQsH3NFH4omrbpXpucyYCCKTSt+na/ZxGhEWQrWTZ0285cA==", "license": "MIT", "peerDependencies": { "@types/react": "*", @@ -1052,14 +946,14 @@ } }, "node_modules/@radix-ui/react-focus-scope": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.7.tgz", - "integrity": "sha512-t2ODlkXBQyn7jkl6TNaw/MtVEVvIGelJDCG41Okq/KwUsJBwQ4XVZsHAVUkK4mBv3ewiAS3PGuUWuY2BoK4ZUw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.3.1.tgz", + "integrity": "sha512-ugeMhbXt4y5S2T1GnIqbWDKEN962PDwnX1fN0eKOOgf5f63Dh2mn8F1FUySlgW0iF6GiVsRF32DzuDIWTUyQJg==", "license": "MIT", "dependencies": { - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-use-callback-ref": "1.1.1" + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-callback-ref": "1.1.5" }, "peerDependencies": { "@types/react": "*", @@ -1077,12 +971,12 @@ } }, "node_modules/@radix-ui/react-id": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.1.tgz", - "integrity": "sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.4.tgz", + "integrity": "sha512-TMQp2llA+RYn7JcjnrMnz7wN4pcVttPZnRZo52PLQsoLVKzNlVwUeHmfePgTgRluXFvlD3GD5g5MOVVTJCO0qA==", "license": "MIT", "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.1" + "@radix-ui/react-use-layout-effect": "1.1.4" }, "peerDependencies": { "@types/react": "*", @@ -1095,35 +989,12 @@ } }, "node_modules/@radix-ui/react-label": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@radix-ui/react-label/-/react-label-2.1.8.tgz", - "integrity": "sha512-FmXs37I6hSBVDlO4y764TNz1rLgKwjJMQ0EGte6F3Cb3f4bIuHB/iLa/8I9VKkmOy+gNHq8rql3j686ACVV21A==", + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/@radix-ui/react-label/-/react-label-2.1.17.tgz", + "integrity": "sha512-xmj7MN/drx1oUAXkfiFIvyDmGNUIN/omGobvA5oAoNqu9zO2MkISYGZOkBcqSzs/UZXXwV+/3ACRE7q7mGcmkA==", "license": "MIT", "dependencies": { - "@radix-ui/react-primitive": "2.1.4" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-label/node_modules/@radix-ui/react-primitive": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.4.tgz", - "integrity": "sha512-9hQc4+GNVtJAIEPEqlYqW5RiYdrr8ea5XQ0ZOnD6fgru+83kqT15mq2OCcbe8KnjRZl5vF3ks69AKz3kh1jrhg==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-slot": "1.2.4" + "@radix-ui/react-primitive": "2.2.0" }, "peerDependencies": { "@types/react": "*", @@ -1141,29 +1012,29 @@ } }, "node_modules/@radix-ui/react-menu": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.1.16.tgz", - "integrity": "sha512-72F2T+PLlphrqLcAotYPp0uJMr5SjP5SL01wfEspJbru5Zs5vQaSHb4VB3ZMJPimgHHCHG7gMOeOB9H3Hdmtxg==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.2.1.tgz", + "integrity": "sha512-G34BsU90SBj5foYpz8pQqq/Q0Dlfyyl6KitWEfRwXC0QvfwhWNAwS49DWP2+rRJ0iwv20Z2Qx7Sk+T03bGo5JA==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.3", - "@radix-ui/react-collection": "1.1.7", - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-context": "1.1.2", - "@radix-ui/react-direction": "1.1.1", - "@radix-ui/react-dismissable-layer": "1.1.11", - "@radix-ui/react-focus-guards": "1.1.3", - "@radix-ui/react-focus-scope": "1.1.7", - "@radix-ui/react-id": "1.1.1", - "@radix-ui/react-popper": "1.2.8", - "@radix-ui/react-portal": "1.1.9", - "@radix-ui/react-presence": "1.1.5", - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-roving-focus": "1.1.11", - "@radix-ui/react-slot": "1.2.3", - "@radix-ui/react-use-callback-ref": "1.1.1", + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-collection": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-direction": "1.2.0", + "@radix-ui/react-dismissable-layer": "1.2.1", + "@radix-ui/react-focus-guards": "1.2.0", + "@radix-ui/react-focus-scope": "1.3.1", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-popper": "1.4.0", + "@radix-ui/react-portal": "1.2.0", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-roving-focus": "1.2.1", + "@radix-ui/react-slot": "1.5.0", + "@radix-ui/react-use-callback-ref": "1.1.5", "aria-hidden": "^1.2.4", - "react-remove-scroll": "^2.6.3" + "react-remove-scroll": "^2.7.2" }, "peerDependencies": { "@types/react": "*", @@ -1180,45 +1051,28 @@ } } }, - "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz", - "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.2" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-popover": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.1.15.tgz", - "integrity": "sha512-kr0X2+6Yy/vJzLYJUPCZEc8SfQcf+1COFoAqauJm74umQhta9M7lNJHP7QQS3vkvcGLQUbWpMzwrXYwrYztHKA==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.3.1.tgz", + "integrity": "sha512-ZNxvXRx5W2Wos4fXCXb5lpdqN0Z5chf+mStOUOTr4ik7d+62MRvoe9rzCA/eGNg36lxXqSrKEKmwuZEcUrIstw==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.3", - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-context": "1.1.2", - "@radix-ui/react-dismissable-layer": "1.1.11", - "@radix-ui/react-focus-guards": "1.1.3", - "@radix-ui/react-focus-scope": "1.1.7", - "@radix-ui/react-id": "1.1.1", - "@radix-ui/react-popper": "1.2.8", - "@radix-ui/react-portal": "1.1.9", - "@radix-ui/react-presence": "1.1.5", - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-slot": "1.2.3", - "@radix-ui/react-use-controllable-state": "1.2.2", + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-dismissable-layer": "1.2.1", + "@radix-ui/react-focus-guards": "1.2.0", + "@radix-ui/react-focus-scope": "1.3.1", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-popper": "1.4.0", + "@radix-ui/react-portal": "1.2.0", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-slot": "1.5.0", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-layout-effect": "1.1.4", "aria-hidden": "^1.2.4", - "react-remove-scroll": "^2.6.3" + "react-remove-scroll": "^2.7.2" }, "peerDependencies": { "@types/react": "*", @@ -1235,40 +1089,22 @@ } } }, - "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz", - "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.2" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-popper": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.8.tgz", - "integrity": "sha512-0NJQ4LFFUuWkE7Oxf0htBKS6zLkkjBH+hM1uk7Ng705ReR8m/uelduy1DBo0PyBXPKVnBA6YBlU94MBGXrSBCw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.4.0.tgz", + "integrity": "sha512-yCWRvLeGv9Pz3+efwHqGPp70mZ56r3kfIgQVF56Oj2aAa4uP/Tb+IE59wNcc+758rctqbCKx4LbK8II/r7Bn0Q==", "license": "MIT", "dependencies": { "@floating-ui/react-dom": "^2.0.0", - "@radix-ui/react-arrow": "1.1.7", - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-context": "1.1.2", - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-use-callback-ref": "1.1.1", - "@radix-ui/react-use-layout-effect": "1.1.1", - "@radix-ui/react-use-rect": "1.1.1", - "@radix-ui/react-use-size": "1.1.1", - "@radix-ui/rect": "1.1.1" + "@radix-ui/react-arrow": "1.1.17", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-callback-ref": "1.1.5", + "@radix-ui/react-use-layout-effect": "1.1.4", + "@radix-ui/react-use-rect": "1.1.4", + "@radix-ui/react-use-size": "1.1.5", + "@radix-ui/rect": "1.1.3" }, "peerDependencies": { "@types/react": "*", @@ -1286,13 +1122,13 @@ } }, "node_modules/@radix-ui/react-portal": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.9.tgz", - "integrity": "sha512-bpIxvq03if6UNwXZ+HTK71JLh4APvnXntDc6XOX8UVq4XQOVl7lwok0AvIl+b8zgCw3fSaVTZMpAPPagXbKmHQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.2.0.tgz", + "integrity": "sha512-StX7xXnaRU41VvFtMm9zlhVGz8XF6GmWWTXftkQaY+tqVkbs/R9UmAp5mLzHHapk5hM9RMZQvO/3usyIP/g42g==", "license": "MIT", "dependencies": { - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-use-layout-effect": "1.1.1" + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-layout-effect": "1.1.4" }, "peerDependencies": { "@types/react": "*", @@ -1310,13 +1146,12 @@ } }, "node_modules/@radix-ui/react-presence": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.5.tgz", - "integrity": "sha512-/jfEwNDdQVBCNvjkGit4h6pMOzq8bHkopq458dPt2lMjx+eBQUohZNG9A7DtO/O5ukSbxuaNGXMjHicgwy6rQQ==", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.11.tgz", + "integrity": "sha512-Z7/atlkab36Z8hm+V8zYc79r0W+tiOB1o0tun1By94JyadkekLQmtEAnBSP9XKXBNQsStoStS4+gX10JpS5akA==", "license": "MIT", "dependencies": { - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-use-layout-effect": "1.1.1" + "@radix-ui/react-use-layout-effect": "1.1.4" }, "peerDependencies": { "@types/react": "*", @@ -1334,12 +1169,12 @@ } }, "node_modules/@radix-ui/react-primitive": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.3.tgz", - "integrity": "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.2.0.tgz", + "integrity": "sha512-HCTSPMNqv55Qk0IX4geJbpyXazmqulcimwuyjxTkKi29v+QZbG2Zho9BnbBq4YS2PF+KlNb2CXoLz66uUmblkg==", "license": "MIT", "dependencies": { - "@radix-ui/react-slot": "1.2.3" + "@radix-ui/react-slot": "1.5.0" }, "peerDependencies": { "@types/react": "*", @@ -1356,24 +1191,6 @@ } } }, - "node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz", - "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.2" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-radio-group": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/@radix-ui/react-radio-group/-/react-radio-group-1.5.1.tgz", @@ -1405,149 +1222,7 @@ } } }, - "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.2.0.tgz", - "integrity": "sha512-KABY+VMIRPJL+Vyzv/335FEhXXD/xDv8BMb1kl48/aXJZMH0LtHCTx5ga5RnxaEP3nZHtmTLf1P9vanmFX46bw==", - "license": "MIT" - }, - "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-collection": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.2.0.tgz", - "integrity": "sha512-+yiQzqcc7Sy7/5s0jrMCjpPRFB3538VNrXPWdTLZhE/SCfgEws4aI6lHWN/vvcnyhHndROWBzqmqB4QBrITZ9Q==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.5", - "@radix-ui/react-context": "1.3.0", - "@radix-ui/react-primitive": "2.2.0", - "@radix-ui/react-slot": "1.5.0", - "@radix-ui/react-use-layout-effect": "1.1.4" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-compose-refs": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.5.tgz", - "integrity": "sha512-+48PbAAbq3didjJxa+OaWY2ZwgAKsNiRGyeHKszblZMQ+kcpd9pAaT11cMkGEie0vsOi3QdeTE6d5Fe3Gn61kA==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-context": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.3.0.tgz", - "integrity": "sha512-v5AYEocMISkbJ+1fTXzZpiFv7NRr3D2WiYbLIKf+FkmJ8VkP6d503eV2n34MFussHXY1pcoq3yfJiQH77dc4Mg==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-direction": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.2.0.tgz", - "integrity": "sha512-FtRA52a/r+LKStFT+neLUm+8vSe7wbzkbQGGeU8ixFiwC8NU14Evoq9ATECqL3eGbcUzJR4fyfA4KkK/q6dfqg==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-id": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.4.tgz", - "integrity": "sha512-TMQp2llA+RYn7JcjnrMnz7wN4pcVttPZnRZo52PLQsoLVKzNlVwUeHmfePgTgRluXFvlD3GD5g5MOVVTJCO0qA==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.4" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-presence": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.11.tgz", - "integrity": "sha512-Z7/atlkab36Z8hm+V8zYc79r0W+tiOB1o0tun1By94JyadkekLQmtEAnBSP9XKXBNQsStoStS4+gX10JpS5akA==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.4" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-primitive": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.2.0.tgz", - "integrity": "sha512-HCTSPMNqv55Qk0IX4geJbpyXazmqulcimwuyjxTkKi29v+QZbG2Zho9BnbBq4YS2PF+KlNb2CXoLz66uUmblkg==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-slot": "1.5.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-roving-focus": { + "node_modules/@radix-ui/react-roving-focus": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.2.1.tgz", "integrity": "sha512-UwraORzVUeEPMclhO1p0vz0qI+TbdDLO9i+FiOqhJyHKwdpCRCck9yVEscUnAMIzCiuNoQa8D4A9bIpOPXGt6Q==", @@ -1580,171 +1255,33 @@ } } }, - "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-slot": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.5.0.tgz", - "integrity": "sha512-tyYd9ddPXAysAbdbD9eYxgwpCSv6f3PncqVSNKQFSR5lcJVLz3cb/pANDoYrLiHBpXv7skortyUgGUWsYuPPFQ==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.5" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-use-callback-ref": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.5.tgz", - "integrity": "sha512-Y5GBf4NKeADoXI1geiMlMuMoURT3k9MizzzKhGb/m55H94aGigZ01PIpkvsO6lML13BA6XYAXSJ6gza7vTn5nw==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.4" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-use-controllable-state": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.3.0.tgz", - "integrity": "sha512-TAcBI7bw2ljYCbv4+zuTSd6zICu8pRt6SDN2vJ/Z06K2MXh6I9WYFe/A9ovlFDtR5HVHGm5iDxDoABm/++dbKg==", - "license": "MIT", - "dependencies": { - "@radix-ui/primitive": "1.2.0", - "@radix-ui/react-use-effect-event": "0.0.5", - "@radix-ui/react-use-layout-effect": "1.1.4" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-use-effect-event": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.5.tgz", - "integrity": "sha512-7cshFL8HGS/7HEiHH+9kL9HBwp2sa9yX18Knwek6KYWmXwM7pegMgta2AXMQKI+rq3JnfSj9x8wYqFMTdG1Jgg==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.4" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-use-layout-effect": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.4.tgz", - "integrity": "sha512-K20DkRkUwDnxEYMBPcg3Y6voLkEy5p5QQmszZgLngKKiC7dzBR/aEuK3w1qlx2JWDUNH6FluahYdgR3BP+QbYw==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-use-size": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.5.tgz", - "integrity": "sha512-V1McDQkMGzgivwqdu7u96APs7oi0Jvj9LTzgq3WWrDZqxWdAqU9yZnZQqk5OizGFR8badUQwZsrlao7MOlWYOA==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.4" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-roving-focus": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.11.tgz", - "integrity": "sha512-7A6S9jSgm/S+7MdtNDSb+IU859vQqJ/QAtcYQcfFC6W8RS4IxIZDldLR0xqCFZ6DCyrQLjLPsxtTNch5jVA4lA==", - "license": "MIT", - "dependencies": { - "@radix-ui/primitive": "1.1.3", - "@radix-ui/react-collection": "1.1.7", - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-context": "1.1.2", - "@radix-ui/react-direction": "1.1.1", - "@radix-ui/react-id": "1.1.1", - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-use-callback-ref": "1.1.1", - "@radix-ui/react-use-controllable-state": "1.2.2" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-select": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.2.6.tgz", - "integrity": "sha512-I30RydO+bnn2PQztvo25tswPH+wFBjehVGtmagkU78yMdwTwVf12wnAOF+AeP8S2N8xD+5UPbGhkUfPyvT+mwQ==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.4.1.tgz", + "integrity": "sha512-888ZwW0Md6GyptuqYABRX9nLKgoYfcooCyBBvVaX5Jp3e+8Jp2i4Zo/Uy50Hm+Ysn2JfloQXstW4U36w8teVtg==", "license": "MIT", "dependencies": { - "@radix-ui/number": "1.1.1", - "@radix-ui/primitive": "1.1.3", - "@radix-ui/react-collection": "1.1.7", - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-context": "1.1.2", - "@radix-ui/react-direction": "1.1.1", - "@radix-ui/react-dismissable-layer": "1.1.11", - "@radix-ui/react-focus-guards": "1.1.3", - "@radix-ui/react-focus-scope": "1.1.7", - "@radix-ui/react-id": "1.1.1", - "@radix-ui/react-popper": "1.2.8", - "@radix-ui/react-portal": "1.1.9", - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-slot": "1.2.3", - "@radix-ui/react-use-callback-ref": "1.1.1", - "@radix-ui/react-use-controllable-state": "1.2.2", - "@radix-ui/react-use-layout-effect": "1.1.1", - "@radix-ui/react-use-previous": "1.1.1", - "@radix-ui/react-visually-hidden": "1.2.3", + "@radix-ui/number": "1.1.3", + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-collection": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-direction": "1.2.0", + "@radix-ui/react-dismissable-layer": "1.2.1", + "@radix-ui/react-focus-guards": "1.2.0", + "@radix-ui/react-focus-scope": "1.3.1", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-popper": "1.4.0", + "@radix-ui/react-portal": "1.2.0", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-slot": "1.5.0", + "@radix-ui/react-use-callback-ref": "1.1.5", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-layout-effect": "1.1.4", + "@radix-ui/react-visually-hidden": "1.2.13", "aria-hidden": "^1.2.4", - "react-remove-scroll": "^2.6.3" + "react-remove-scroll": "^2.7.2" }, "peerDependencies": { "@types/react": "*", @@ -1761,24 +1298,6 @@ } } }, - "node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz", - "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.2" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-slider": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/@radix-ui/react-slider/-/react-slider-1.6.1.tgz", @@ -1811,114 +1330,7 @@ } } }, - "node_modules/@radix-ui/react-slider/node_modules/@radix-ui/number": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.1.3.tgz", - "integrity": "sha512-Road2bidD0uu/1BGDOWNdPI06g0lIRy6IF9GZcIrDK2KGItfor8IQwQa+yM2ERgHM1MmHxaxpTzk0/Jp42lNfA==", - "license": "MIT" - }, - "node_modules/@radix-ui/react-slider/node_modules/@radix-ui/primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.2.0.tgz", - "integrity": "sha512-KABY+VMIRPJL+Vyzv/335FEhXXD/xDv8BMb1kl48/aXJZMH0LtHCTx5ga5RnxaEP3nZHtmTLf1P9vanmFX46bw==", - "license": "MIT" - }, - "node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-collection": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.2.0.tgz", - "integrity": "sha512-+yiQzqcc7Sy7/5s0jrMCjpPRFB3538VNrXPWdTLZhE/SCfgEws4aI6lHWN/vvcnyhHndROWBzqmqB4QBrITZ9Q==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.5", - "@radix-ui/react-context": "1.3.0", - "@radix-ui/react-primitive": "2.2.0", - "@radix-ui/react-slot": "1.5.0", - "@radix-ui/react-use-layout-effect": "1.1.4" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-compose-refs": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.5.tgz", - "integrity": "sha512-+48PbAAbq3didjJxa+OaWY2ZwgAKsNiRGyeHKszblZMQ+kcpd9pAaT11cMkGEie0vsOi3QdeTE6d5Fe3Gn61kA==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-context": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.3.0.tgz", - "integrity": "sha512-v5AYEocMISkbJ+1fTXzZpiFv7NRr3D2WiYbLIKf+FkmJ8VkP6d503eV2n34MFussHXY1pcoq3yfJiQH77dc4Mg==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-direction": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.2.0.tgz", - "integrity": "sha512-FtRA52a/r+LKStFT+neLUm+8vSe7wbzkbQGGeU8ixFiwC8NU14Evoq9ATECqL3eGbcUzJR4fyfA4KkK/q6dfqg==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-primitive": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.2.0.tgz", - "integrity": "sha512-HCTSPMNqv55Qk0IX4geJbpyXazmqulcimwuyjxTkKi29v+QZbG2Zho9BnbBq4YS2PF+KlNb2CXoLz66uUmblkg==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-slot": "1.5.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-slot": { + "node_modules/@radix-ui/react-slot": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.5.0.tgz", "integrity": "sha512-tyYd9ddPXAysAbdbD9eYxgwpCSv6f3PncqVSNKQFSR5lcJVLz3cb/pANDoYrLiHBpXv7skortyUgGUWsYuPPFQ==", @@ -1936,108 +1348,18 @@ } } }, - "node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-controllable-state": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.3.0.tgz", - "integrity": "sha512-TAcBI7bw2ljYCbv4+zuTSd6zICu8pRt6SDN2vJ/Z06K2MXh6I9WYFe/A9ovlFDtR5HVHGm5iDxDoABm/++dbKg==", + "node_modules/@radix-ui/react-switch": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-switch/-/react-switch-1.4.1.tgz", + "integrity": "sha512-NpBGwc40rY02ZmSvuyeKk0Bvc8ZsNeTMi4qHvJ+ZH4EiYCv0zIXEgdCW4bVdzgIUeP9xxbLJSxKOUfqITYNmkA==", "license": "MIT", "dependencies": { "@radix-ui/primitive": "1.2.0", - "@radix-ui/react-use-effect-event": "0.0.5", - "@radix-ui/react-use-layout-effect": "1.1.4" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-effect-event": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.5.tgz", - "integrity": "sha512-7cshFL8HGS/7HEiHH+9kL9HBwp2sa9yX18Knwek6KYWmXwM7pegMgta2AXMQKI+rq3JnfSj9x8wYqFMTdG1Jgg==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.4" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-layout-effect": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.4.tgz", - "integrity": "sha512-K20DkRkUwDnxEYMBPcg3Y6voLkEy5p5QQmszZgLngKKiC7dzBR/aEuK3w1qlx2JWDUNH6FluahYdgR3BP+QbYw==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-size": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.5.tgz", - "integrity": "sha512-V1McDQkMGzgivwqdu7u96APs7oi0Jvj9LTzgq3WWrDZqxWdAqU9yZnZQqk5OizGFR8badUQwZsrlao7MOlWYOA==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.4" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-slot": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.4.tgz", - "integrity": "sha512-Jl+bCv8HxKnlTLVrcDE8zTMJ09R9/ukw4qBs/oZClOfoQk/cOTbDn+NceXfV7j09YPVQUryJPHurafcSg6EVKA==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.2" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-switch": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@radix-ui/react-switch/-/react-switch-1.2.6.tgz", - "integrity": "sha512-bByzr1+ep1zk4VubeEVViV592vu2lHE2BZY5OnzehZqOOgogN80+mNtCqPkhn2gklJqOpxWgPoYTSnhBCqpOXQ==", - "license": "MIT", - "dependencies": { - "@radix-ui/primitive": "1.1.3", - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-context": "1.1.2", - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-use-controllable-state": "1.2.2", - "@radix-ui/react-use-previous": "1.1.1", - "@radix-ui/react-use-size": "1.1.1" + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-size": "1.1.5" }, "peerDependencies": { "@types/react": "*", @@ -2055,19 +1377,19 @@ } }, "node_modules/@radix-ui/react-tabs": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.1.13.tgz", - "integrity": "sha512-7xdcatg7/U+7+Udyoj2zodtI9H/IIopqo+YOIcZOq1nJwXWBZ9p8xiu5llXlekDbZkca79a/fozEYQXIA4sW6A==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.2.1.tgz", + "integrity": "sha512-hRoJlode+hg5ZNlR+3tkfkUliIybdTpD5lkAvHQ9yaXseGf7XVO9Ib2GPEIOuaJJbo7YWYbNpDDRfo8Dhf6/xA==", "license": "MIT", "dependencies": { - "@radix-ui/primitive": "1.1.3", - "@radix-ui/react-context": "1.1.2", - "@radix-ui/react-direction": "1.1.1", - "@radix-ui/react-id": "1.1.1", - "@radix-ui/react-presence": "1.1.5", - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-roving-focus": "1.1.11", - "@radix-ui/react-use-controllable-state": "1.2.2" + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-direction": "1.2.0", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-roving-focus": "1.2.1", + "@radix-ui/react-use-controllable-state": "1.3.0" }, "peerDependencies": { "@types/react": "*", @@ -2120,256 +1442,7 @@ } } }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.2.0.tgz", - "integrity": "sha512-KABY+VMIRPJL+Vyzv/335FEhXXD/xDv8BMb1kl48/aXJZMH0LtHCTx5ga5RnxaEP3nZHtmTLf1P9vanmFX46bw==", - "license": "MIT" - }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-arrow": { - "version": "1.1.17", - "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.17.tgz", - "integrity": "sha512-67jjcVvxjXCCStnTW3Z+M7jmaFMuMR7M2JgpDzH4w7JSRrikmzhjfYgP/09ECb8n7whnsgh1ifJ+Ie96qEj+pQ==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-primitive": "2.2.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-compose-refs": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.5.tgz", - "integrity": "sha512-+48PbAAbq3didjJxa+OaWY2ZwgAKsNiRGyeHKszblZMQ+kcpd9pAaT11cMkGEie0vsOi3QdeTE6d5Fe3Gn61kA==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-context": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.3.0.tgz", - "integrity": "sha512-v5AYEocMISkbJ+1fTXzZpiFv7NRr3D2WiYbLIKf+FkmJ8VkP6d503eV2n34MFussHXY1pcoq3yfJiQH77dc4Mg==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.2.1.tgz", - "integrity": "sha512-KIfDcAsx+oVylFZ4xryVKusJUrLLhTQmfnJW4kwk4Km5myvhHCrj04hnWWUC166+xD4DHdH8tQGylwYX1h6+Pg==", - "license": "MIT", - "dependencies": { - "@radix-ui/primitive": "1.2.0", - "@radix-ui/react-compose-refs": "1.1.5", - "@radix-ui/react-primitive": "2.2.0", - "@radix-ui/react-use-callback-ref": "1.1.5", - "@radix-ui/react-use-effect-event": "0.0.5" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-focus-scope": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.3.1.tgz", - "integrity": "sha512-ugeMhbXt4y5S2T1GnIqbWDKEN962PDwnX1fN0eKOOgf5f63Dh2mn8F1FUySlgW0iF6GiVsRF32DzuDIWTUyQJg==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.5", - "@radix-ui/react-primitive": "2.2.0", - "@radix-ui/react-use-callback-ref": "1.1.5" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-id": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.4.tgz", - "integrity": "sha512-TMQp2llA+RYn7JcjnrMnz7wN4pcVttPZnRZo52PLQsoLVKzNlVwUeHmfePgTgRluXFvlD3GD5g5MOVVTJCO0qA==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.4" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-popper": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.4.0.tgz", - "integrity": "sha512-yCWRvLeGv9Pz3+efwHqGPp70mZ56r3kfIgQVF56Oj2aAa4uP/Tb+IE59wNcc+758rctqbCKx4LbK8II/r7Bn0Q==", - "license": "MIT", - "dependencies": { - "@floating-ui/react-dom": "^2.0.0", - "@radix-ui/react-arrow": "1.1.17", - "@radix-ui/react-compose-refs": "1.1.5", - "@radix-ui/react-context": "1.3.0", - "@radix-ui/react-primitive": "2.2.0", - "@radix-ui/react-use-callback-ref": "1.1.5", - "@radix-ui/react-use-layout-effect": "1.1.4", - "@radix-ui/react-use-rect": "1.1.4", - "@radix-ui/react-use-size": "1.1.5", - "@radix-ui/rect": "1.1.3" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.2.0.tgz", - "integrity": "sha512-StX7xXnaRU41VvFtMm9zlhVGz8XF6GmWWTXftkQaY+tqVkbs/R9UmAp5mLzHHapk5hM9RMZQvO/3usyIP/g42g==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-primitive": "2.2.0", - "@radix-ui/react-use-layout-effect": "1.1.4" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-presence": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.11.tgz", - "integrity": "sha512-Z7/atlkab36Z8hm+V8zYc79r0W+tiOB1o0tun1By94JyadkekLQmtEAnBSP9XKXBNQsStoStS4+gX10JpS5akA==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.4" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.2.0.tgz", - "integrity": "sha512-HCTSPMNqv55Qk0IX4geJbpyXazmqulcimwuyjxTkKi29v+QZbG2Zho9BnbBq4YS2PF+KlNb2CXoLz66uUmblkg==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-slot": "1.5.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.5.0.tgz", - "integrity": "sha512-tyYd9ddPXAysAbdbD9eYxgwpCSv6f3PncqVSNKQFSR5lcJVLz3cb/pANDoYrLiHBpXv7skortyUgGUWsYuPPFQ==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.5" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref": { + "node_modules/@radix-ui/react-use-callback-ref": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.5.tgz", "integrity": "sha512-Y5GBf4NKeADoXI1geiMlMuMoURT3k9MizzzKhGb/m55H94aGigZ01PIpkvsO6lML13BA6XYAXSJ6gza7vTn5nw==", @@ -2387,7 +1460,7 @@ } } }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-controllable-state": { + "node_modules/@radix-ui/react-use-controllable-state": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.3.0.tgz", "integrity": "sha512-TAcBI7bw2ljYCbv4+zuTSd6zICu8pRt6SDN2vJ/Z06K2MXh6I9WYFe/A9ovlFDtR5HVHGm5iDxDoABm/++dbKg==", @@ -2407,7 +1480,7 @@ } } }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-effect-event": { + "node_modules/@radix-ui/react-use-effect-event": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.5.tgz", "integrity": "sha512-7cshFL8HGS/7HEiHH+9kL9HBwp2sa9yX18Knwek6KYWmXwM7pegMgta2AXMQKI+rq3JnfSj9x8wYqFMTdG1Jgg==", @@ -2425,156 +1498,6 @@ } } }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-layout-effect": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.4.tgz", - "integrity": "sha512-K20DkRkUwDnxEYMBPcg3Y6voLkEy5p5QQmszZgLngKKiC7dzBR/aEuK3w1qlx2JWDUNH6FluahYdgR3BP+QbYw==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-rect": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.4.tgz", - "integrity": "sha512-cSOCh6JlkmfjLyNcLiu2nB4v+nm+dkZ+Q5KHWk/soo4U7ZLiEQFKHK9/YmtBHjfCEaU43IBKQOc4/uJmCaiCTQ==", - "license": "MIT", - "dependencies": { - "@radix-ui/rect": "1.1.3" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-size": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.5.tgz", - "integrity": "sha512-V1McDQkMGzgivwqdu7u96APs7oi0Jvj9LTzgq3WWrDZqxWdAqU9yZnZQqk5OizGFR8badUQwZsrlao7MOlWYOA==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.4" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-visually-hidden": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.2.13.tgz", - "integrity": "sha512-feijiN1oPk4rck4u9Dm9tsU4mT6Wp9oeEEhaz1WUEs1VuqLf8xzsFG+Qk+uWq6TnMH9O+WRECRg0NftyP9E4Fw==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-primitive": "2.2.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/rect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.3.tgz", - "integrity": "sha512-JtyZR+mqgBibTo8xea3B6ZRmzZiM/YeVBtUkas6zMuXjAlfIFIW2FgqeM9eLyvEaYX66vr6DJMK+4U6LV0KhNw==", - "license": "MIT" - }, - "node_modules/@radix-ui/react-use-callback-ref": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.1.tgz", - "integrity": "sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-use-controllable-state": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.2.tgz", - "integrity": "sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-use-effect-event": "0.0.2", - "@radix-ui/react-use-layout-effect": "1.1.1" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-use-effect-event": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.2.tgz", - "integrity": "sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.1" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-use-escape-keydown": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.1.tgz", - "integrity": "sha512-Il0+boE7w/XebUHyBjroE+DbByORGR9KKmITzbR7MyQ4akpORYP/ZmbhAr0DG7RmmBqoOnZdy2QlvajJ2QA59g==", - "license": "MIT", - "dependencies": { - "@radix-ui/react-use-callback-ref": "1.1.1" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-use-is-hydrated": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@radix-ui/react-use-is-hydrated/-/react-use-is-hydrated-0.1.3.tgz", @@ -2591,24 +1514,9 @@ } }, "node_modules/@radix-ui/react-use-layout-effect": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz", - "integrity": "sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-use-previous": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.1.tgz", - "integrity": "sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.4.tgz", + "integrity": "sha512-K20DkRkUwDnxEYMBPcg3Y6voLkEy5p5QQmszZgLngKKiC7dzBR/aEuK3w1qlx2JWDUNH6FluahYdgR3BP+QbYw==", "license": "MIT", "peerDependencies": { "@types/react": "*", @@ -2621,12 +1529,12 @@ } }, "node_modules/@radix-ui/react-use-rect": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.1.tgz", - "integrity": "sha512-QTYuDesS0VtuHNNvMh+CjlKJ4LJickCMUAqjlE3+j8w+RlRpwyX3apEQKGFzbZGdo7XNG1tXa+bQqIE7HIXT2w==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.4.tgz", + "integrity": "sha512-cSOCh6JlkmfjLyNcLiu2nB4v+nm+dkZ+Q5KHWk/soo4U7ZLiEQFKHK9/YmtBHjfCEaU43IBKQOc4/uJmCaiCTQ==", "license": "MIT", "dependencies": { - "@radix-ui/rect": "1.1.1" + "@radix-ui/rect": "1.1.3" }, "peerDependencies": { "@types/react": "*", @@ -2639,12 +1547,12 @@ } }, "node_modules/@radix-ui/react-use-size": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.1.tgz", - "integrity": "sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.5.tgz", + "integrity": "sha512-V1McDQkMGzgivwqdu7u96APs7oi0Jvj9LTzgq3WWrDZqxWdAqU9yZnZQqk5OizGFR8badUQwZsrlao7MOlWYOA==", "license": "MIT", "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.1" + "@radix-ui/react-use-layout-effect": "1.1.4" }, "peerDependencies": { "@types/react": "*", @@ -2657,12 +1565,12 @@ } }, "node_modules/@radix-ui/react-visually-hidden": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.2.3.tgz", - "integrity": "sha512-pzJq12tEaaIhqjbzpCuv/OypJY/BPavOofm+dbab+MHLajy277+1lLm6JFcGgF5eskJ6mquGirhXY2GD/8u8Ug==", + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.2.13.tgz", + "integrity": "sha512-feijiN1oPk4rck4u9Dm9tsU4mT6Wp9oeEEhaz1WUEs1VuqLf8xzsFG+Qk+uWq6TnMH9O+WRECRg0NftyP9E4Fw==", "license": "MIT", "dependencies": { - "@radix-ui/react-primitive": "2.1.3" + "@radix-ui/react-primitive": "2.2.0" }, "peerDependencies": { "@types/react": "*", @@ -2680,15 +1588,32 @@ } }, "node_modules/@radix-ui/rect": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.1.tgz", - "integrity": "sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.3.tgz", + "integrity": "sha512-JtyZR+mqgBibTo8xea3B6ZRmzZiM/YeVBtUkas6zMuXjAlfIFIW2FgqeM9eLyvEaYX66vr6DJMK+4U6LV0KhNw==", "license": "MIT" }, + "node_modules/@rolldown/binding-android-arm-eabi": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.16.tgz", + "integrity": "sha512-ia3DwAs0OsMGS7+IConptSiyk9pEXkOx/AbJ2n/lAGxH3QkWQus1t8d7gnAT38FCU2sQu8lUbeR6AiZFv4JxaA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, "node_modules/@rolldown/binding-android-arm64": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.1.5.tgz", - "integrity": "sha512-lZg8fqIv2v7FF237bwMgzGZEJvGL79/s5knJ/i6FmsGF4XXlzccZ4jb+TrFIxtSSxFtIpdsgrPZeMk1I9AFcyQ==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.16.tgz", + "integrity": "sha512-kx5wBiMB6E7TEvpl2B9gjLU004BkvEm2Dr941BFjx/SontPwSzNuQUIoVKxHHoSjpFIfHMmcguyLOtyn0hObRg==", "cpu": [ "arm64" ], @@ -2703,9 +1628,9 @@ } }, "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.1.5.tgz", - "integrity": "sha512-51Bnx9pNiMRKSUNtBfySkNJ9vMU9Hh3I1ozDd6gyPPYzaXCfnptUcEZxXGYFn+ul2dtcMUiqGR1Yai2K10uoTw==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.16.tgz", + "integrity": "sha512-qslZrXnKJU4cUpjoAmtAo/KQM9e2IRMlmpig6Zpwj+8KWxW8v+nkAf9216Bsek9lOC1jvg2yCjygCFo2f83msQ==", "cpu": [ "arm64" ], @@ -2720,9 +1645,9 @@ } }, "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.1.5.tgz", - "integrity": "sha512-Tm+gbfC0aHu1tBA/JvKQh32S0K6YgCHkiAF4/W6xX0K0RmNuc94VeK419dJoE65R5aRxmo+noZQSWrAMF6yb6g==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.16.tgz", + "integrity": "sha512-FdF+y48ND13eAyM2mQn+85kvAqNlvRWROy2rhgA463X/0Gv4vGtazZtfaF1mRBLscYvtOlh4QnLjOWiFzX69OQ==", "cpu": [ "x64" ], @@ -2737,9 +1662,9 @@ } }, "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.1.5.tgz", - "integrity": "sha512-JMzDKCCXq93YccG5gz3hvOs1oXRKAf0XYpfOS88e+wZrC8Iugj6j68867vrYZkvpDDpKn/KoKORThmchMpF6TA==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.16.tgz", + "integrity": "sha512-ddjqFM5e95AgLbUPtKIS7V1KTVlA0RUgCVr5mn+/IEhsdy3pr+Vuj/HZ7nlMN2FyxIwUktOH1LEPIQXO1v9y1Q==", "cpu": [ "x64" ], @@ -2754,9 +1679,9 @@ } }, "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.1.5.tgz", - "integrity": "sha512-uML21j2K5TfPGutKxub+M+nLjZIrWjXQ5Grx4lCe/nimTj9B4L63zHpjXLl4y0L3mcm2htEQIb06oCG/szerNw==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.16.tgz", + "integrity": "sha512-tHdKWbFkFBI687iim3LIyIvyL7j66VvQYkDPss5Stn/qyE2tWkR1YD0dXmXPFKKqT/o5ZEJVsaRsWS2meQwGOA==", "cpu": [ "arm" ], @@ -2771,13 +1696,16 @@ } }, "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.5.tgz", - "integrity": "sha512-navSiuTMogvnQoZoM/v+l3ZWo50/NTwSHSzheABx/RCnmUPaKwq9qSo4Br2OYRs21+Fz8uFqITZM3H4opOB0/Q==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.16.tgz", + "integrity": "sha512-FJiLGAblPBMlBEdbOqw6kW6QcXDWAf/oJu7gYs9ZJZwmg+K+/zjFLxPTIY9izJUzxzc24FHvmseyA0IvJSl17w==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2788,13 +1716,16 @@ } }, "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.5.tgz", - "integrity": "sha512-lAryqH7IteztmCXQXk0etKj4wBQ7Gx5S6LjKhsgp9zb8I5bsuvU/2llH1hDQcjsFeqIsovMVN339/8pUDDBXxA==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.16.tgz", + "integrity": "sha512-hrJpblMsrQ58U9veWpbXzkhV5zStunds6HWLprqq1qauvgBr1E6P+24kLj6lSLI9vjRn/RYpjprhkHQPKGWpNg==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -2805,13 +1736,16 @@ } }, "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.1.5.tgz", - "integrity": "sha512-fsK/sNBnxzBlL4O1JNrZakVQxPspqpED5dLtNsZS9oOKmtSpdNIzxH2kkol5HYTWJN47sE20ztMJPxfZ89qGOg==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.16.tgz", + "integrity": "sha512-qJd/dC6j6CwLG9/s/RP2nb1RZ0GIgj7Ioj7x/SYa3RzjVrlzrmH0fhIOpfvqQDeIsdP0loi+kHaMhJzY1PBIaA==", "cpu": [ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2822,13 +1756,16 @@ } }, "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.1.5.tgz", - "integrity": "sha512-gLYb4BIadlfTOYT5gO503n8zQjXflgzpD0FcyKh0Mzx3rqCZKnHoJWV9xe1KXUJ5lx2JfcSHr/mhzS0PC/McAA==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.16.tgz", + "integrity": "sha512-Vx7Xg5uUJuNcujJjI70OICaH0EYj80BtOLZTSN7uOYg8QOLlyKnaG0IW7Fn/J0IpJsaKzmDKMhOQv1JBM9m9vg==", "cpu": [ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2839,13 +1776,16 @@ } }, "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.5.tgz", - "integrity": "sha512-FjcpEKUyJygHgs1o50VYNvkt5+7Le/VEdYt0AkRpkL33MnyQfwr8l5mXwMmfmTbyMPr5vJLC+8/Gd9gXnwU1QQ==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.16.tgz", + "integrity": "sha512-TNKhgE3uJTsTzatUSSYt0Kgo+Oa2uSlSjz4r1aEIea7HX6ULBym4fAlYUhG1i6pjNf2njfCUAfKwr6C3E9Xg1w==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2856,13 +1796,16 @@ } }, "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.5.tgz", - "integrity": "sha512-Me+PfPI2TMeOQk0gYWfLQZtTktrmzbr8cDboqX83XKc7UrgAi55gF+2dUkWdxd19n55Essp2yeca+O9N5rBxHg==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.16.tgz", + "integrity": "sha512-7chXdpjXZ8qG0+mIxECN3cT9kvhZ3/oZhMX6Pp876P7CDrIy8nJswva6Mq357JR7eYXfuskwZxMeV1SzoZdHrA==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -2873,9 +1816,9 @@ } }, "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.1.5.tgz", - "integrity": "sha512-yc5WrLzXks6zCQfn9Oxr8pORKyl/pF+QjHmW/Qx3qu0oyrrNC+y2JLTU1E2rcWYAmzlnqngWXHQjy51VzW70Vw==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.16.tgz", + "integrity": "sha512-Kwjt+7uNTJK5/MDkGWGVO2KQPnj8yAV75dMpfwyHZrJSXWHrniOB0aUEWlVYf3H1hOqFLIStLdM5QXq6bnKmOQ==", "cpu": [ "arm64" ], @@ -2889,29 +1832,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/binding-wasm32-wasi": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.1.5.tgz", - "integrity": "sha512-VbQGPX2b4r48TAMIM2cjgluIM1HYutm4pcTEJsle7iEP7sB1dFqtPLBVbdLAZCxy1txCcPxf4QFf4v8uvltPqA==", - "cpu": [ - "wasm32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "1.11.1", - "@emnapi/runtime": "1.11.1", - "@napi-rs/wasm-runtime": "^1.1.6" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.5.tgz", - "integrity": "sha512-gHv82k63z4qpV5+Q1y/12KrK0ltWBukVDI8nZcbT7Tt/ZlOIVwppazneq0F93oDxTo3IgAMEDIoQh3E2n6mVsw==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.16.tgz", + "integrity": "sha512-/LH6WfjDRXXJz/p5xl4TmU+jpcnwcxbKEQBW/GZE0JHfN0lGIyTtsUEGaQ/q/GikkGJ2yLKe6pwm7AnEWO8pdw==", "cpu": [ "arm64" ], @@ -2926,9 +1850,9 @@ } }, "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.5.tgz", - "integrity": "sha512-tTZuDBPw85tEN5PQi1pnEBzDy0Z49HtScLAbD5t6hyeU92A95pRWaSMw1GZZi/RwgSgUIl0xrSlXIT/9QzvYSA==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.16.tgz", + "integrity": "sha512-1lv1KvX0Z871zfk7vw+dnXMMnHNyDwMzWG8Kv3HxDXMOhzCX4SHc7HK319fInP0i+0p9D8brkfzL7pJOaGl+tw==", "cpu": [ "x64" ], @@ -2950,9 +1874,9 @@ "license": "MIT" }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.62.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.62.2.tgz", - "integrity": "sha512-BfzEnDJOt9T8M989/lA37EcJgat01wLRnoi5dQf3QzOH7jzpqTAzdDbVfRljVr5r+jzKqpbHeyOfAaXxAd0PAA==", + "version": "4.67.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.67.2.tgz", + "integrity": "sha512-DeuVFilvaGtoS9TFIbTIQ0Kt4CBqP3xnjJ8SFqWWbXlFbrpmCdivEW7Rm38trRA8rZzQQ8lhs73nEetWotJpTg==", "cpu": [ "x64" ], @@ -2968,17 +1892,6 @@ "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==", "license": "MIT" }, - "node_modules/@tybys/wasm-util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", - "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@types/d3-array": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz", @@ -3031,9 +1944,9 @@ } }, "node_modules/@types/d3-selection": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.11.tgz", - "integrity": "sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==", + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.12.tgz", + "integrity": "sha512-Qe/KWYhEiIIxGs7HrAAjMfShxKldx19SJtr5zu53f3afPsdZNz7HHtdTLXo/kqeiWNXVycI24kSnfzBYkTzpgw==", "license": "MIT" }, "node_modules/@types/d3-shape": { @@ -3067,9 +1980,9 @@ } }, "node_modules/@types/d3-zoom": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.8.tgz", - "integrity": "sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.9.tgz", + "integrity": "sha512-0sE1406XBYJGiqD3AusTl9ZqC//2mIXix51tbom25gDCA8ri4xnSZg28CaSE8Srl6FClqABUKfsn0qghgdepMA==", "license": "MIT", "dependencies": { "@types/d3-interpolate": "*", @@ -3119,9 +2032,9 @@ } }, "node_modules/@vitejs/plugin-react": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.0.3.tgz", - "integrity": "sha512-vmFvco5/QuC2f9Oj+wTk0+9XeDFkHxSamwZKYc7MxYwKICfvUvlMhqKI0VuICPltGqh1neqBKDvO4kes1ya8vg==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.1.2.tgz", + "integrity": "sha512-fhJNGUdscQa4HkI0xFxwonWyhnVReCPDbXI7FH7jmzpnVCrFQI7PRrhWecO263610vOrs9tr2Y4xcf8uAdFxbw==", "dev": true, "license": "MIT", "dependencies": { @@ -3133,6 +2046,7 @@ "peerDependencies": { "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", "babel-plugin-react-compiler": "^1.0.0", + "oxc-transform-react": "^0.152.0", "vite": "^8.0.0" }, "peerDependenciesMeta": { @@ -3141,26 +2055,23 @@ }, "babel-plugin-react-compiler": { "optional": true + }, + "oxc-transform-react": { + "optional": true } } }, "node_modules/@xterm/addon-fit": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@xterm/addon-fit/-/addon-fit-0.10.0.tgz", - "integrity": "sha512-UFYkDm4HUahf2lnEyHvio51TNGiLK66mqP2JoATy7hRZeXaGMRDr00JiSF7m63vR5WKATF605yEggJKsw0JpMQ==", - "license": "MIT", - "peerDependencies": { - "@xterm/xterm": "^5.0.0" - } + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@xterm/addon-fit/-/addon-fit-0.11.0.tgz", + "integrity": "sha512-jYcgT6xtVYhnhgxh3QgYDnnNMYTcf8ElbxxFzX0IZo+vabQqSPAjC3c1wJrKB5E19VwQei89QCiZZP86DCPF7g==", + "license": "MIT" }, "node_modules/@xterm/addon-web-links": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@xterm/addon-web-links/-/addon-web-links-0.11.0.tgz", - "integrity": "sha512-nIHQ38pQI+a5kXnRaTgwqSHnX7KE6+4SVoceompgHL26unAxdfP6IPqUTSYPQgSwM56hsElfoNrrW5V7BUED/Q==", - "license": "MIT", - "peerDependencies": { - "@xterm/xterm": "^5.0.0" - } + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@xterm/addon-web-links/-/addon-web-links-0.12.0.tgz", + "integrity": "sha512-4Smom3RPyVp7ZMYOYDoC/9eGJJJqYhnPLGGqJ6wOBfB8VxPViJNSKdgRYb8NpaM6YSelEKbA2SStD7lGyqaobw==", + "license": "MIT" }, "node_modules/@xterm/xterm": { "version": "5.5.0", @@ -3169,24 +2080,34 @@ "license": "MIT" }, "node_modules/@xyflow/react": { - "version": "12.10.0", - "resolved": "https://registry.npmjs.org/@xyflow/react/-/react-12.10.0.tgz", - "integrity": "sha512-eOtz3whDMWrB4KWVatIBrKuxECHqip6PfA8fTpaS2RUGVpiEAe+nqDKsLqkViVWxDGreq0lWX71Xth/SPAzXiw==", + "version": "12.12.0", + "resolved": "https://registry.npmjs.org/@xyflow/react/-/react-12.12.0.tgz", + "integrity": "sha512-74oXI0Rgm1Eu33cHQAd74J6oVgCH9mbFyTVQbsGgp2kmWwh0HdtBr2VP04z8mbPD+M/xO69nqG5dDEt7/EN2rQ==", "license": "MIT", "dependencies": { - "@xyflow/system": "0.0.74", + "@xyflow/system": "0.0.83", "classcat": "^5.0.3", "zustand": "^4.4.0" }, "peerDependencies": { + "@types/react": ">=17", + "@types/react-dom": ">=17", "react": ">=17", "react-dom": ">=17" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } } }, "node_modules/@xyflow/system": { - "version": "0.0.74", - "resolved": "https://registry.npmjs.org/@xyflow/system/-/system-0.0.74.tgz", - "integrity": "sha512-7v7B/PkiVrkdZzSbL+inGAo6tkR/WQHHG0/jhSvLQToCsfa8YubOGmBYd1s08tpKpihdHDZFwzQZeR69QSBb4Q==", + "version": "0.0.83", + "resolved": "https://registry.npmjs.org/@xyflow/system/-/system-0.0.83.tgz", + "integrity": "sha512-a//eDjez3WZF47aaPTfVUDD0OINOq+WVwBZCRTqG+m0a5euX8EwlJ4jMY1Wxz0Ocj4xOeekJ70V22Pq0ll8RJw==", "license": "MIT", "dependencies": { "@types/d3-drag": "^3.0.7", @@ -3447,9 +2368,9 @@ "license": "MIT" }, "node_modules/boneyard-js": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/boneyard-js/-/boneyard-js-1.9.0.tgz", - "integrity": "sha512-FlIHm7YyQ6GMBPaNY6um5ESHNyZGONoSZ0IMhayuyemBsCUhhDl4nC/gMTOi/25ojtrlnRInTWKqFKb7hGK6Cg==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/boneyard-js/-/boneyard-js-1.10.0.tgz", + "integrity": "sha512-bHyZFdBHswa6Rt2aP0F1pNpPn4/lRcTMRWAt1d7tbFZLoPnwjztr6cmAVa/vaQwTOH9ETD3Lz4vW1iuvQDJNqg==", "dev": true, "license": "MIT", "dependencies": { @@ -3583,16 +2504,16 @@ } }, "node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", + "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", "dev": true, "license": "MIT", "dependencies": { - "readdirp": "^4.0.1" + "readdirp": "^5.0.0" }, "engines": { - "node": ">= 14.16.0" + "node": ">= 20.19.0" }, "funding": { "url": "https://paulmillr.com/funding/" @@ -4370,13 +3291,13 @@ } }, "node_modules/eslint-plugin-react-refresh": { - "version": "0.4.26", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.26.tgz", - "integrity": "sha512-1RETEylht2O6FM/MvgnyvT+8K21wLqDNg4qD51Zj3guhjt433XbnnkVttHMyaVyAFD03QSV4LPS5iE3VQmO7XQ==", + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.5.7.tgz", + "integrity": "sha512-XhJSzLljuYD4UjNuFGJu2v7aD3sqNVK12w5/DCUfrNfHWegZo2+TsavNx8MuxMwEquuFAzNbNfXKU0WoZ+YUIg==", "dev": true, "license": "MIT", "peerDependencies": { - "eslint": ">=8.40" + "eslint": "^9 || ^10" } }, "node_modules/eslint-scope": { @@ -4917,9 +3838,9 @@ } }, "node_modules/i18next": { - "version": "26.3.6", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-26.3.6.tgz", - "integrity": "sha512-Bu5Z2nAXgfVyM8xvW3jk9EKRIuX37PudsrBViThNFx7CR7aaYTpP01cxNB/E4c4UUzTDiAZRstEhsRfPOL/8xA==", + "version": "26.5.12", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-26.5.12.tgz", + "integrity": "sha512-vTt8tc3y5axoU7wwTYg8vjpILLyP33a5GyGJAVI7FDRx1XueYxZVIkcVeStoftrVnAM/o28hKvK0sslucDI9aQ==", "funding": [ { "type": "individual", @@ -5517,9 +4438,9 @@ } }, "node_modules/lightningcss": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", - "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", "dev": true, "license": "MPL-2.0", "dependencies": { @@ -5533,23 +4454,23 @@ "url": "https://opencollective.com/parcel" }, "optionalDependencies": { - "lightningcss-android-arm64": "1.32.0", - "lightningcss-darwin-arm64": "1.32.0", - "lightningcss-darwin-x64": "1.32.0", - "lightningcss-freebsd-x64": "1.32.0", - "lightningcss-linux-arm-gnueabihf": "1.32.0", - "lightningcss-linux-arm64-gnu": "1.32.0", - "lightningcss-linux-arm64-musl": "1.32.0", - "lightningcss-linux-x64-gnu": "1.32.0", - "lightningcss-linux-x64-musl": "1.32.0", - "lightningcss-win32-arm64-msvc": "1.32.0", - "lightningcss-win32-x64-msvc": "1.32.0" + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" } }, "node_modules/lightningcss-android-arm64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", - "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", "cpu": [ "arm64" ], @@ -5568,9 +4489,9 @@ } }, "node_modules/lightningcss-darwin-arm64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", - "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", "cpu": [ "arm64" ], @@ -5589,9 +4510,9 @@ } }, "node_modules/lightningcss-darwin-x64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", - "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", "cpu": [ "x64" ], @@ -5610,9 +4531,9 @@ } }, "node_modules/lightningcss-freebsd-x64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", - "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", "cpu": [ "x64" ], @@ -5631,9 +4552,9 @@ } }, "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", - "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", "cpu": [ "arm" ], @@ -5652,13 +4573,16 @@ } }, "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", - "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -5673,13 +4597,16 @@ } }, "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", - "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -5694,13 +4621,16 @@ } }, "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", - "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -5715,13 +4645,16 @@ } }, "node_modules/lightningcss-linux-x64-musl": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", - "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -5736,9 +4669,9 @@ } }, "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", - "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", "cpu": [ "arm64" ], @@ -5757,9 +4690,9 @@ } }, "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", - "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", "cpu": [ "x64" ], @@ -5857,9 +4790,9 @@ "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.18", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", - "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", "dev": true, "funding": [ { @@ -6113,9 +5046,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", - "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, "license": "MIT", "engines": { @@ -6126,50 +5059,32 @@ } }, "node_modules/playwright": { - "version": "1.61.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.61.1.tgz", - "integrity": "sha512-DWnY5o3YbLWK4GovuAVwpqL+1VwGNdUGrRr++8j8PtQQzvAVZUIMjKQ90fY689sEJZJBbZVw1rXaOKSTitkzPQ==", + "version": "1.64.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.64.1.tgz", + "integrity": "sha512-HCrVhHr5QQuwYoswEUGTb7gGp522yflbv/ST8nF4sFWGuLjQCt17Q/EubpGGSNKYn1tsTCPZxqHhHCfVURu7UA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright-core": "1.61.1" + "playwright-core": "1.64.1" }, "bin": { "playwright": "cli.js" }, "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "fsevents": "2.3.2" + "node": ">=20" } }, "node_modules/playwright-core": { - "version": "1.61.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.61.1.tgz", - "integrity": "sha512-h7Qlt6m4REp25qvIdvbDtVmD4LqVXfpRxhORv9L0jzETM05p4fuPJ3dKyuSXQxDSbXnmS79HAgi9589lGSpLkg==", + "version": "1.64.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.64.1.tgz", + "integrity": "sha512-BC4s8y6SEVA6Q1rSxZTto8hI1KUI3xXlHGZgvGqP4IqPdI/a6FX9H29IDNz7vKo9l21b6LfYosScPL6M3xxyDQ==", "dev": true, "license": "Apache-2.0", "bin": { "playwright-core": "cli.js" }, "engines": { - "node": ">=18" - } - }, - "node_modules/playwright/node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "node": ">=20" } }, "node_modules/possible-typed-array-names": { @@ -6183,9 +5098,9 @@ } }, "node_modules/postcss": { - "version": "8.5.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.23.tgz", - "integrity": "sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg==", + "version": "8.5.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.32.tgz", + "integrity": "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==", "dev": true, "funding": [ { @@ -6203,9 +5118,9 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.16", + "nanoid": "^3.3.20", "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" + "source-map-js": "^1.2.2" }, "engines": { "node": "^10 || ^12 || >=14" @@ -6268,12 +5183,12 @@ } }, "node_modules/react-i18next": { - "version": "17.0.11", - "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-17.0.11.tgz", - "integrity": "sha512-cDtkXgxjuFTWUH6V+aQn1Ve5vDiUztCNPWW5GtSHDccsgRXO1nE6QFWCEmc1KAutrb3OUv87wFShJL5RhUwPXg==", + "version": "17.1.9", + "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-17.1.9.tgz", + "integrity": "sha512-OgYqIH13XHPlWTaaI795Dz+k2AdKnXcOxNQVnf750T8Ij0TYWp1nYvXRpoJBulPqlyk2OAbn1PM4tFKiIj/byA==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.29.2", + "@babel/runtime": "^7.29.7", "html-parse-stringify": "^4.0.1", "use-sync-external-store": "^1.6.0" }, @@ -6295,9 +5210,9 @@ } }, "node_modules/react-icons": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.6.0.tgz", - "integrity": "sha512-RH93p5ki6LfOiIt0UtDyNg/cee+HLVR6cHHtW3wALfo+eOHTp8RnU2kRkI6E+H19zMIs03DyxUG/GfZMOGvmiA==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.7.0.tgz", + "integrity": "sha512-LBLy340Rzqy6+/yVhZKT3B/QpP1BZaesGqasf09HPOBzRarcDIFH0WwXlXQfE7q7ipxK4MSiC5DIBWURCny6fw==", "license": "MIT", "peerDependencies": { "react": "*" @@ -6357,9 +5272,9 @@ } }, "node_modules/react-router": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.2.tgz", - "integrity": "sha512-aUVMjFm3GAPTTZL7oYr5E7ETiqfQCHRLH+B+5afnICvf0r7kkK4eR6SMuwbSTJw/7t+12khT/Kahij49fqOCIg==", + "version": "7.18.5", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.5.tgz", + "integrity": "sha512-dTgvcXDOrLPrlLHrcZAqWveiK1hMSqN+rGAJzegP8HtmNkfRxOoshGWBNX3ZJ0cZjOHkRdlUJtaIhZMLLyGyPw==", "license": "MIT", "dependencies": { "cookie": "^1.0.1", @@ -6379,12 +5294,12 @@ } }, "node_modules/react-router-dom": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.18.2.tgz", - "integrity": "sha512-AIKJ/jgGlFb3EbfCXk5Gzshiwt+l3mqbCrNjmEWMMjqQxNJ3svBa6bgzFyCC2Sw3RA0VWF1kg3uQf2OFhxb8hw==", + "version": "7.18.5", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.18.5.tgz", + "integrity": "sha512-9HcfDMU6JJ/fp6gJZYGwNE6RknVGS4kBjH1HkNw959mCJi70TVwdipQWv2FEol9uGpi+SZTFtVpJPtEQfayeOw==", "license": "MIT", "dependencies": { - "react-router": "7.18.2" + "react-router": "7.18.5" }, "engines": { "node": ">=20.0.0" @@ -6448,13 +5363,13 @@ } }, "node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.1.1.tgz", + "integrity": "sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA==", "dev": true, "license": "MIT", "engines": { - "node": ">= 14.18.0" + "node": ">= 20.19.0" }, "funding": { "type": "individual", @@ -6572,13 +5487,13 @@ } }, "node_modules/rolldown": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.5.tgz", - "integrity": "sha512-t9z29cJjXf/vxQ8dyhCSpt6H6aSwHTk8cT5I3iy6SMXuFpk5mB6PL6XfC8PCwrPTx93udwKUm9HRteAlTGBLiA==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.16.tgz", + "integrity": "sha512-bWvlMpFKiTfDKfnK7FC2MPgPeWCf/Kpwsq49ApdW+FQaBZb6O6dZ4MAPbPUjp7hYQrw/RobqCzn64BRrQecGHw==", "dev": true, "license": "MIT", "dependencies": { - "@oxc-project/types": "=0.139.0", + "@oxc-project/types": "=0.156.0", "@rolldown/pluginutils": "^1.0.0" }, "bin": { @@ -6588,21 +5503,21 @@ "node": "^20.19.0 || >=22.12.0" }, "optionalDependencies": { - "@rolldown/binding-android-arm64": "1.1.5", - "@rolldown/binding-darwin-arm64": "1.1.5", - "@rolldown/binding-darwin-x64": "1.1.5", - "@rolldown/binding-freebsd-x64": "1.1.5", - "@rolldown/binding-linux-arm-gnueabihf": "1.1.5", - "@rolldown/binding-linux-arm64-gnu": "1.1.5", - "@rolldown/binding-linux-arm64-musl": "1.1.5", - "@rolldown/binding-linux-ppc64-gnu": "1.1.5", - "@rolldown/binding-linux-s390x-gnu": "1.1.5", - "@rolldown/binding-linux-x64-gnu": "1.1.5", - "@rolldown/binding-linux-x64-musl": "1.1.5", - "@rolldown/binding-openharmony-arm64": "1.1.5", - "@rolldown/binding-wasm32-wasi": "1.1.5", - "@rolldown/binding-win32-arm64-msvc": "1.1.5", - "@rolldown/binding-win32-x64-msvc": "1.1.5" + "@rolldown/binding-android-arm-eabi": "1.2.16", + "@rolldown/binding-android-arm64": "1.2.16", + "@rolldown/binding-darwin-arm64": "1.2.16", + "@rolldown/binding-darwin-x64": "1.2.16", + "@rolldown/binding-freebsd-x64": "1.2.16", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.16", + "@rolldown/binding-linux-arm64-gnu": "1.2.16", + "@rolldown/binding-linux-arm64-musl": "1.2.16", + "@rolldown/binding-linux-ppc64-gnu": "1.2.16", + "@rolldown/binding-linux-s390x-gnu": "1.2.16", + "@rolldown/binding-linux-x64-gnu": "1.2.16", + "@rolldown/binding-linux-x64-musl": "1.2.16", + "@rolldown/binding-openharmony-arm64": "1.2.16", + "@rolldown/binding-win32-arm64-msvc": "1.2.16", + "@rolldown/binding-win32-x64-msvc": "1.2.16" } }, "node_modules/safe-array-concat": { @@ -6661,13 +5576,13 @@ } }, "node_modules/sass": { - "version": "1.98.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.98.0.tgz", - "integrity": "sha512-+4N/u9dZ4PrgzGgPlKnaaRQx64RO0JBKs9sDhQ2pLgN6JQZ25uPQZKQYaBJU48Kd5BxgXoJ4e09Dq7nMcOUW3A==", + "version": "1.107.1", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.107.1.tgz", + "integrity": "sha512-aJ1/LvxOOb04YhmiBjzZn3jVwdHKol+OVhoMV6fFl02fF9T3i+5Mg9l/CnzqtM+NX5Jn5o3lAbs/ZJivTCLHfQ==", "dev": true, "license": "MIT", "dependencies": { - "chokidar": "^4.0.0", + "chokidar": "^5.0.0", "immutable": "^5.1.5", "source-map-js": ">=0.6.2 <2.0.0" }, @@ -6675,7 +5590,7 @@ "sass": "sass.js" }, "engines": { - "node": ">=14.0.0" + "node": ">=20.19.0" }, "optionalDependencies": { "@parcel/watcher": "^2.4.1" @@ -6701,9 +5616,9 @@ } }, "node_modules/set-cookie-parser": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz", - "integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==", + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.3.tgz", + "integrity": "sha512-irZHtTqurLna57KQG/s+fzOwv/J6XSH4cs8M/vsrY3uCaQ3S6+QJguAH0WdN47SXlk82voMZ4naWMQf8fdEoIg==", "license": "MIT" }, "node_modules/set-function-length": { @@ -6855,9 +5770,9 @@ } }, "node_modules/socket.io-client": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.8.3.tgz", - "integrity": "sha512-uP0bpjWrjQmUt5DTHq9RuoCBdFJF10cdX9X+a368j/Ft0wmaVgxlrjvK3kjvgCODOMMOz9lcaRzxmso0bTWZ/g==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.8.4.tgz", + "integrity": "sha512-7wjKAvVXYOJsbmUgkWbnhPD4bFpkqrUR0++XOjpGFmqDqsqV1CI93VTraeExLxpjxEqrWgFoSRZu1ihjLWfkAA==", "license": "MIT", "dependencies": { "@socket.io/component-emitter": "~3.1.0", @@ -6883,19 +5798,25 @@ } }, "node_modules/sonner": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/sonner/-/sonner-2.0.7.tgz", - "integrity": "sha512-W6ZN4p58k8aDKA4XPcx2hpIQXBRAgyiWVkYhT7CvK6D3iAu7xjvVyhQHg2/iaKJZ1XVJ4r7XuwGL+WGEK37i9w==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/sonner/-/sonner-2.0.8.tgz", + "integrity": "sha512-UM/ByIoFra8yzV75n1o0Puu0bw5U/9UNnDacrJNspekBewIfsQ3D6ez1nvlWpt7aTsO6rujQtifBpycwIivqlg==", "license": "MIT", "peerDependencies": { + "@types/react": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0 || ^19.0.0-rc", "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } } }, "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -7277,16 +6198,16 @@ } }, "node_modules/vite": { - "version": "8.1.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.4.tgz", - "integrity": "sha512-bTT9PsdWO+MQMNG9ZXIP/qM9wGh37DFxTV/sPq9cFpHr3w4jkgef032PkAL9jAqhk3Nz8NQw3O8n6/xFkqO4QQ==", + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.5.tgz", + "integrity": "sha512-z1YpjieJ9g0ebTmQpLBv/oq9E3F9EIlOe+7LahW8SrE3LTiG3udBRUXQOlYXP9b+IC2q2phHeVxj9xGlw34OEQ==", "dev": true, "license": "MIT", "dependencies": { - "lightningcss": "^1.32.0", - "picomatch": "^4.0.5", - "postcss": "^8.5.16", - "rolldown": "~1.1.4", + "lightningcss": "^1.33.0", + "picomatch": "^4.0.7", + "postcss": "^8.5.30", + "rolldown": "~1.2.14", "tinyglobby": "^0.2.17" }, "bin": { @@ -7303,7 +6224,7 @@ }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", - "@vitejs/devtools": "^0.3.0", + "@vitejs/devtools": "^0.7.1 || ^0.8.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", diff --git a/frontend/package.json b/frontend/package.json index f6fcfc5b..c814b2cf 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -41,53 +41,53 @@ "preview": "vite preview" }, "optionalDependencies": { - "@rollup/rollup-win32-x64-msvc": "^4.62.2" + "@rollup/rollup-win32-x64-msvc": "^4.67.2" }, "dependencies": { - "@radix-ui/react-alert-dialog": "^1.1.15", - "@radix-ui/react-checkbox": "^1.3.3", + "@radix-ui/react-alert-dialog": "^1.2.1", + "@radix-ui/react-checkbox": "^1.4.1", "@radix-ui/react-dialog": "^1.1.15", - "@radix-ui/react-dropdown-menu": "^2.1.16", - "@radix-ui/react-label": "^2.1.8", - "@radix-ui/react-popover": "^1.1.15", + "@radix-ui/react-dropdown-menu": "^2.2.1", + "@radix-ui/react-label": "^2.1.17", + "@radix-ui/react-popover": "^1.3.1", "@radix-ui/react-radio-group": "^1.5.1", - "@radix-ui/react-select": "^2.2.6", + "@radix-ui/react-select": "^2.4.1", "@radix-ui/react-slider": "^1.6.1", "@radix-ui/react-slot": "^1.2.4", - "@radix-ui/react-switch": "^1.2.6", - "@radix-ui/react-tabs": "^1.1.13", + "@radix-ui/react-switch": "^1.4.1", + "@radix-ui/react-tabs": "^1.2.1", "@radix-ui/react-tooltip": "^1.4.1", - "@xterm/addon-fit": "^0.10.0", - "@xterm/addon-web-links": "^0.11.0", + "@xterm/addon-fit": "^0.11.0", + "@xterm/addon-web-links": "^0.12.0", "@xterm/xterm": "^5.5.0", - "@xyflow/react": "^12.10.0", + "@xyflow/react": "^12.12.0", "clsx": "^2.1.1", "cmdk": "^1.1.1", - "i18next": "^26.3.6", + "i18next": "^26.5.12", "lucide-react": "^0.363.0", "react": "^18.3.1", "react-dom": "^18.3.1", - "react-i18next": "^17.0.11", - "react-icons": "^5.6.0", - "react-router-dom": "^7.18.1", + "react-i18next": "^17.1.9", + "react-icons": "^5.7.0", + "react-router-dom": "^7.18.5", "recharts": "^2.12.3", - "socket.io-client": "^4.7.2", - "sonner": "^2.0.7" + "socket.io-client": "^4.8.4", + "sonner": "^2.0.8" }, "devDependencies": { "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", - "@vitejs/plugin-react": "^6.0.3", - "boneyard-js": "^1.9.0", + "@vitejs/plugin-react": "^6.1.2", + "boneyard-js": "^1.10.0", "eslint": "^9.9.0", "eslint-plugin-react": "^7.35.0", "eslint-plugin-react-hooks": "^5.1.0-rc.0", - "eslint-plugin-react-refresh": "^0.4.9", + "eslint-plugin-react-refresh": "^0.5.7", "espree": "^11.2.0", "globals": "^15.9.0", - "playwright": "1.61.1", - "sass": "^1.86.0", - "vite": "^8.1.4" + "playwright": "1.64.1", + "sass": "^1.107.1", + "vite": "^8.3.5" }, "overrides": { "lodash": "4.18.1", From 0a111ad7f157709fbbe341fecca5a39aaf216a2e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 3 Nov 2026 01:25:02 +0000 Subject: [PATCH 039/171] chore: bump version to 1.11.34 [skip ci] --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index e043124c..88415bde 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.11.33 +1.11.34 From 53639f7eaef2bc408a2d8eb6817d0159cdaeca2a Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 2 Nov 2026 20:35:56 -0500 Subject: [PATCH 040/171] fix(frontend): move non-component exports out of component files Clears the new react-refresh/only-export-components warnings so the frontend dependency group bump passes lint. --- frontend/src/components/PageSkeleton.jsx | 2 -- .../dashboard/grid/WidgetEditor.jsx | 3 +- .../dashboard/widgets/quickActions.js | 24 +++++++++++++ .../dashboard/widgets/renderers.jsx | 36 +------------------ .../src/components/pageSkeletonVariants.js | 2 ++ frontend/src/pages/StyleGuide.jsx | 3 +- 6 files changed, 31 insertions(+), 39 deletions(-) create mode 100644 frontend/src/components/dashboard/widgets/quickActions.js create mode 100644 frontend/src/components/pageSkeletonVariants.js diff --git a/frontend/src/components/PageSkeleton.jsx b/frontend/src/components/PageSkeleton.jsx index d886e8de..15e4cb5a 100644 --- a/frontend/src/components/PageSkeleton.jsx +++ b/frontend/src/components/PageSkeleton.jsx @@ -332,6 +332,4 @@ export function PageSkeleton({ variant = 'panel', rows, className = '' }) { ); } -export const PAGE_SKELETON_VARIANTS = Object.keys(VARIANTS); - export default PageSkeleton; diff --git a/frontend/src/components/dashboard/grid/WidgetEditor.jsx b/frontend/src/components/dashboard/grid/WidgetEditor.jsx index 63097682..a75a7bb0 100644 --- a/frontend/src/components/dashboard/grid/WidgetEditor.jsx +++ b/frontend/src/components/dashboard/grid/WidgetEditor.jsx @@ -15,7 +15,8 @@ import { // Single source of truth for shortcut targets: what a user can pick here is // exactly what the renderer can draw. WidgetBody is what the board itself // draws with, so the preview cannot drift from the real thing. -import { QUICK_ACTION_OPTIONS, WidgetBody } from '../widgets/renderers'; +import { WidgetBody } from '../widgets/renderers'; +import { QUICK_ACTION_OPTIONS } from '../widgets/quickActions'; import { deriveWidgetTitle } from '../widgets/registry'; import { GRID_COLS, GRID_GAP, GRID_ROW } from './layout'; import { useTranslation } from 'react-i18next'; diff --git a/frontend/src/components/dashboard/widgets/quickActions.js b/frontend/src/components/dashboard/widgets/quickActions.js new file mode 100644 index 00000000..21660ed8 --- /dev/null +++ b/frontend/src/components/dashboard/widgets/quickActions.js @@ -0,0 +1,24 @@ +import { Archive, Boxes, Container, Database, FolderOpen, Globe, ListChecks, Activity, Rocket, Server, ShieldCheck, Terminal } from 'lucide-react'; + +// Every destination is a real route registered in App.jsx. +export const ACTIONS = { + servers: ['Manage servers', Server, '/servers'], + services: ['Services', Boxes, '/services'], + docker: ['Docker containers', Container, '/docker'], + terminal: ['Open terminal', Terminal, '/terminal'], + deploys: ['Deploy activity', Rocket, '/deployments'], + databases: ['Databases', Database, '/databases'], + backups: ['Backups', Archive, '/backups'], + monitoring: ['Monitoring', Activity, '/monitoring'], + domains: ['Domains', Globe, '/domains'], + files: ['File manager', FolderOpen, '/files'], + security: ['Security', ShieldCheck, '/security'], + jobs: ['Jobs', ListChecks, '/monitoring/jobs'], +}; + +export const QUICK_ACTION_KEYS = Object.keys(ACTIONS); + +// [key, label] pairs for the inspector's shortcut picker. Derived from ACTIONS +// so the list of shortcuts a user can *choose* can never drift from the list +// this widget can actually *render* — they did drift once already. +export const QUICK_ACTION_OPTIONS = Object.entries(ACTIONS).map(([key, [label]]) => [key, label]); diff --git a/frontend/src/components/dashboard/widgets/renderers.jsx b/frontend/src/components/dashboard/widgets/renderers.jsx index d7902f25..f83249e0 100644 --- a/frontend/src/components/dashboard/widgets/renderers.jsx +++ b/frontend/src/components/dashboard/widgets/renderers.jsx @@ -11,23 +11,12 @@ import { formatRelativeTime } from '@/utils/time'; */ import { Component, useEffect, useId, useMemo, useRef, useState } from 'react'; import { - Activity, - Archive, ArrowDown, ArrowUp, - Boxes, - Container, - Database, - FolderOpen, - Globe, - ListChecks, - Rocket, - Server, - ShieldCheck, - Terminal, } from 'lucide-react'; import { Gauge, Pill, serviceStatusKind, statusKind, alertStatusKind } from '@/components/ds'; import { getWidgetType } from './registry'; +import { ACTIONS } from './quickActions'; import { useTranslation } from 'react-i18next'; import { t } from '../../../i18n/t'; import { formatTime } from '@/utils/intl'; @@ -753,29 +742,6 @@ function WFeed({ cfg, ctx }) { /* ----------------------------------------------------------------- actions */ -// Every destination is a real route registered in App.jsx. -const ACTIONS = { - servers: ['Manage servers', Server, '/servers'], - services: ['Services', Boxes, '/services'], - docker: ['Docker containers', Container, '/docker'], - terminal: ['Open terminal', Terminal, '/terminal'], - deploys: ['Deploy activity', Rocket, '/deployments'], - databases: ['Databases', Database, '/databases'], - backups: ['Backups', Archive, '/backups'], - monitoring: ['Monitoring', Activity, '/monitoring'], - domains: ['Domains', Globe, '/domains'], - files: ['File manager', FolderOpen, '/files'], - security: ['Security', ShieldCheck, '/security'], - jobs: ['Jobs', ListChecks, '/monitoring/jobs'], -}; - -export const QUICK_ACTION_KEYS = Object.keys(ACTIONS); - -// [key, label] pairs for the inspector's shortcut picker. Derived from ACTIONS -// so the list of shortcuts a user can *choose* can never drift from the list -// this widget can actually *render* — they did drift once already. -export const QUICK_ACTION_OPTIONS = Object.entries(ACTIONS).map(([key, [label]]) => [key, label]); - function WActions({ cfg, ctx }) { const { t } = useTranslation(); const items = (Array.isArray(cfg.items) ? cfg.items : []).filter((key) => ACTIONS[key]); diff --git a/frontend/src/components/pageSkeletonVariants.js b/frontend/src/components/pageSkeletonVariants.js new file mode 100644 index 00000000..2cd068a4 --- /dev/null +++ b/frontend/src/components/pageSkeletonVariants.js @@ -0,0 +1,2 @@ +// Keep in sync with VARIANTS in PageSkeleton.jsx. +export const PAGE_SKELETON_VARIANTS = ['panel', 'table', 'feed', 'cards', 'detail', 'console', 'form', 'chart', 'tree', 'split']; diff --git a/frontend/src/pages/StyleGuide.jsx b/frontend/src/pages/StyleGuide.jsx index 2270f2a8..73f6d156 100644 --- a/frontend/src/pages/StyleGuide.jsx +++ b/frontend/src/pages/StyleGuide.jsx @@ -20,7 +20,8 @@ import Modal from '../components/Modal'; import { ConfirmDialog } from '../components/ConfirmDialog'; import StatusBadge from '../components/StatusBadge'; import EmptyState from '../components/EmptyState'; -import { PageSkeleton, PAGE_SKELETON_VARIANTS } from '../components/PageSkeleton'; +import { PageSkeleton } from '../components/PageSkeleton'; +import { PAGE_SKELETON_VARIANTS } from '../components/pageSkeletonVariants'; import { Spinner } from '../components/Spinner'; import { StatCard, StatsGrid } from '../components/StatCard'; import { DangerZone } from '../components/DangerZone'; From 0f6a8b62c2982eb236ec20b7de08abf1995c121f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2026 01:40:02 +0000 Subject: [PATCH 041/171] build(deps): bump lucide-react from 0.363.0 to 1.65.0 in /frontend Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.363.0 to 1.65.0. - [Release notes](https://github.com/lucide-icons/lucide/releases) - [Commits](https://github.com/lucide-icons/lucide/commits/1.65.0/packages/lucide-react) --- updated-dependencies: - dependency-name: lucide-react dependency-version: 1.53.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- frontend/package-lock.json | 17 +++++++++++------ frontend/package.json | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 3b4de467..206778a1 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -21,7 +21,6 @@ "@radix-ui/react-switch": "^1.4.1", "@radix-ui/react-tabs": "^1.2.1", "@radix-ui/react-tooltip": "^1.4.1", - "@rollup/rollup-win32-x64-msvc": "4.67.2", "@xterm/addon-fit": "^0.11.0", "@xterm/addon-web-links": "^0.12.0", "@xterm/xterm": "^5.5.0", @@ -29,7 +28,7 @@ "clsx": "^2.1.1", "cmdk": "^1.1.1", "i18next": "^26.5.12", - "lucide-react": "^0.363.0", + "lucide-react": "^1.65.0", "react": "^18.3.1", "react-dom": "^18.3.1", "react-i18next": "^17.1.9", @@ -4752,12 +4751,18 @@ } }, "node_modules/lucide-react": { - "version": "0.363.0", - "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.363.0.tgz", - "integrity": "sha512-AlsfPCsXQyQx7wwsIgzcKOL9LwC498LIMAo+c0Es5PkHJa33xwmYAkkSoKoJWWWSYQEStqu58/jT4tL2gi32uQ==", + "version": "1.65.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-1.65.0.tgz", + "integrity": "sha512-roSdtzudEY39i2hn5LLjA8toYfhF2z4S10WSqZF4ubXpHlOmNTvaxMxZLdJfQDi6pEifQWX+cRmYihKSsvAxfA==", "license": "ISC", "peerDependencies": { - "react": "^16.5.1 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } } }, "node_modules/math-intrinsics": { diff --git a/frontend/package.json b/frontend/package.json index c814b2cf..646b86f4 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -64,7 +64,7 @@ "clsx": "^2.1.1", "cmdk": "^1.1.1", "i18next": "^26.5.12", - "lucide-react": "^0.363.0", + "lucide-react": "^1.65.0", "react": "^18.3.1", "react-dom": "^18.3.1", "react-i18next": "^17.1.9", From 2bef5060ed0d331a9e27e865d42c75e170dc7c8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2026 01:40:49 +0000 Subject: [PATCH 042/171] build(deps-dev): bump globals from 15.15.0 to 17.13.0 in /frontend Bumps [globals](https://github.com/sindresorhus/globals) from 15.15.0 to 17.13.0. - [Release notes](https://github.com/sindresorhus/globals/releases) - [Commits](https://github.com/sindresorhus/globals/compare/v15.15.0...v17.13.0) --- updated-dependencies: - dependency-name: globals dependency-version: 17.13.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- frontend/package-lock.json | 9 ++++----- frontend/package.json | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 3b4de467..7cbe407e 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -21,7 +21,6 @@ "@radix-ui/react-switch": "^1.4.1", "@radix-ui/react-tabs": "^1.2.1", "@radix-ui/react-tooltip": "^1.4.1", - "@rollup/rollup-win32-x64-msvc": "4.67.2", "@xterm/addon-fit": "^0.11.0", "@xterm/addon-web-links": "^0.12.0", "@xterm/xterm": "^5.5.0", @@ -49,7 +48,7 @@ "eslint-plugin-react-hooks": "^5.1.0-rc.0", "eslint-plugin-react-refresh": "^0.5.7", "espree": "^11.2.0", - "globals": "^15.9.0", + "globals": "^17.13.0", "playwright": "1.64.1", "sass": "^1.107.1", "vite": "^8.3.5" @@ -3692,9 +3691,9 @@ } }, "node_modules/globals": { - "version": "15.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", - "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", + "version": "17.13.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-17.13.0.tgz", + "integrity": "sha512-RwMTC61u7hrG3ZJMkZQOK4JLJrKS8QtoTii63EmWvFXHqycY9FObBJQCbsLxSO8kjKhWE5kV1GC+Vb1g3RI0Zg==", "dev": true, "license": "MIT", "engines": { diff --git a/frontend/package.json b/frontend/package.json index c814b2cf..8880d85a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -84,7 +84,7 @@ "eslint-plugin-react-hooks": "^5.1.0-rc.0", "eslint-plugin-react-refresh": "^0.5.7", "espree": "^11.2.0", - "globals": "^15.9.0", + "globals": "^17.13.0", "playwright": "1.64.1", "sass": "^1.107.1", "vite": "^8.3.5" From e703322362389eba19ff9dc7fac8f021150bc5c7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 3 Nov 2026 01:41:57 +0000 Subject: [PATCH 043/171] chore: bump version to 1.11.35 [skip ci] --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 88415bde..0697ed44 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.11.34 +1.11.35 From 436a38562e8b605018a404da9237ea0b8ec4c82f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 3 Nov 2026 01:47:39 +0000 Subject: [PATCH 044/171] chore: bump version to 1.11.36 [skip ci] --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 0697ed44..5111d36c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.11.35 +1.11.36 From ac618394590b31d2d01b72f8e1e6e44c6db42e18 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Mon, 2 Nov 2026 21:08:15 -0500 Subject: [PATCH 045/171] fix(frontend): replace lucide brand icons removed in v1 with react-icons --- frontend/src/components/settings/AboutTab.jsx | 3 ++- frontend/src/components/settings/IconReferenceTab.jsx | 5 +---- frontend/src/components/settings/ThemeStudioModal.jsx | 3 ++- frontend/src/pages/GithubAppCallback.jsx | 3 ++- frontend/src/pages/Services.jsx | 3 ++- frontend/src/pages/SourceConnectionCallback.jsx | 3 ++- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/settings/AboutTab.jsx b/frontend/src/components/settings/AboutTab.jsx index ef12b108..bdf24881 100644 --- a/frontend/src/components/settings/AboutTab.jsx +++ b/frontend/src/components/settings/AboutTab.jsx @@ -1,9 +1,10 @@ import { useState, useEffect, useRef } from 'react'; import api from '../../services/api'; import { - Github, FileText, HelpCircle, MessageSquare, Bug, Check, Download, CheckCircle, + FileText, HelpCircle, MessageSquare, Bug, Check, Download, CheckCircle, RefreshCw, ExternalLink, Star, X, AlertTriangle } from 'lucide-react'; +import { SiGithub as Github } from 'react-icons/si'; import ServerKitLogo from '../ServerKitLogo'; import ErrorState from '../ErrorState'; import { Button } from '@/components/ui/button'; diff --git a/frontend/src/components/settings/IconReferenceTab.jsx b/frontend/src/components/settings/IconReferenceTab.jsx index bfb25df2..425a4698 100644 --- a/frontend/src/components/settings/IconReferenceTab.jsx +++ b/frontend/src/components/settings/IconReferenceTab.jsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import { - Github, FileText, HelpCircle, MessageSquare, Bug, Check, Download, CheckCircle, + FileText, HelpCircle, MessageSquare, Bug, Check, Download, CheckCircle, RefreshCw, ExternalLink, Star, X, Code, Search, Container, Globe, BarChart3, Database, Shield, Cloud, Video, Music, Image, Home, Server, GitBranch, Workflow, HardDrive, Lock, Users, Settings as SettingsIcon, Layers, ChevronDown, Copy, Tag, @@ -48,9 +48,6 @@ const ICON_CATALOG = { 'Navigation & UI': { Home, Star, Sun, Moon, Palette, Play, Square, Calendar, Clock, LogOut, SettingsIcon, Newspaper, TrendingUp, BarChart3, Minus - }, - 'Brands': { - Github } }; diff --git a/frontend/src/components/settings/ThemeStudioModal.jsx b/frontend/src/components/settings/ThemeStudioModal.jsx index 8a4a87e6..6e5cb979 100644 --- a/frontend/src/components/settings/ThemeStudioModal.jsx +++ b/frontend/src/components/settings/ThemeStudioModal.jsx @@ -1,5 +1,6 @@ import { useEffect, useMemo, useState, useId } from 'react'; -import { Download, Save, Github } from 'lucide-react'; +import { Download, Save } from 'lucide-react'; +import { SiGithub as Github } from 'react-icons/si'; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, } from '@/components/ui/dialog'; diff --git a/frontend/src/pages/GithubAppCallback.jsx b/frontend/src/pages/GithubAppCallback.jsx index 83a4e87e..90b3629e 100644 --- a/frontend/src/pages/GithubAppCallback.jsx +++ b/frontend/src/pages/GithubAppCallback.jsx @@ -1,6 +1,7 @@ import { useEffect, useRef, useState } from 'react'; import { useNavigate, useSearchParams } from 'react-router-dom'; -import { Github, Loader2 } from 'lucide-react'; +import { Loader2 } from 'lucide-react'; +import { SiGithub as Github } from 'react-icons/si'; import api from '../services/api'; import { useToast } from '../contexts/useToast.js'; import { useTranslation } from 'react-i18next'; diff --git a/frontend/src/pages/Services.jsx b/frontend/src/pages/Services.jsx index fc943559..cdce5c8d 100644 --- a/frontend/src/pages/Services.jsx +++ b/frontend/src/pages/Services.jsx @@ -1,6 +1,7 @@ import { useCallback, useState, useEffect, useMemo } from 'react'; import { useNavigate, Link } from 'react-router-dom'; -import { Layers, Plus, Square, Play, RotateCw, GitBranch, Github, FolderOpen, FileArchive, FolderKanban, ArrowDownToLine } from 'lucide-react'; +import { Layers, Plus, Square, Play, RotateCw, GitBranch, FolderOpen, FileArchive, FolderKanban, ArrowDownToLine } from 'lucide-react'; +import { SiGithub as Github } from 'react-icons/si'; import api from '../services/api'; import { useToast } from '../contexts/useToast.js'; import { getServiceType, getStatusConfig, formatRelativeTime } from '../utils/serviceTypes'; diff --git a/frontend/src/pages/SourceConnectionCallback.jsx b/frontend/src/pages/SourceConnectionCallback.jsx index 8b6a9e1f..84d9242a 100644 --- a/frontend/src/pages/SourceConnectionCallback.jsx +++ b/frontend/src/pages/SourceConnectionCallback.jsx @@ -1,6 +1,7 @@ import { useEffect, useRef, useState } from 'react'; import { useNavigate, useParams, useSearchParams } from 'react-router-dom'; -import { Github, Gitlab, GitBranch, Loader2 } from 'lucide-react'; +import { GitBranch, Loader2 } from 'lucide-react'; +import { SiGithub as Github, SiGitlab as Gitlab } from 'react-icons/si'; import { SiBitbucket } from 'react-icons/si'; import api from '../services/api'; import { useToast } from '../contexts/useToast.js'; From 2ef0a8f3701f7079dca2b64365018a48565a729d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 3 Nov 2026 02:14:28 +0000 Subject: [PATCH 046/171] chore: bump version to 1.11.37 [skip ci] --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 5111d36c..c7b3d9fd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.11.36 +1.11.37 From a4d2ea37ef5b0abcfb56505f1305ffca2f9e8b5f Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Tue, 3 Nov 2026 00:04:58 -0500 Subject: [PATCH 047/171] feat(agents): permission levels, signed report endpoint, health alerts Agent-reported monitor/protect/full level (never settable from the panel), POST /api/v1/agent/report for report-only agents, silence-based offline detection, service-check alerts via MetricAlert, a panel-side command gate, docs, and a demo seed script. Migration 112. Co-Authored-By: Claude Sonnet 5.5 --- CHANGELOG.md | 9 + SECURITY.md | 6 + backend/app/agent_gateway.py | 5 +- backend/app/api/agent_poll.py | 4 +- backend/app/api/agent_report.py | 53 +++++ backend/app/api/servers.py | 8 + backend/app/api/servers_agents.py | 12 +- backend/app/core_blueprints.py | 1 + backend/app/jobs/builtin_handlers.py | 6 +- backend/app/models/metric_alert.py | 3 + backend/app/models/server.py | 17 ++ backend/app/services/agent_health_service.py | 223 ++++++++++++++++++ backend/app/services/agent_registry.py | 37 ++- backend/app/services/permission_levels.py | 56 +++++ .../app/services/server_timeline_service.py | 1 + .../versions/112_agent_permission_levels.py | 36 +++ backend/scripts/seed_permission_demo.py | 80 +++++++ backend/tests/test_agent_permission_levels.py | 208 ++++++++++++++++ backend/tests/test_core_blueprint_registry.py | 4 +- backend/tests/test_route_authz_static.py | 1 + backend/tests/test_route_authz_sweep.py | 1 + backend/tests/test_seed_permission_demo.py | 17 ++ docs/AGENT_PERMISSION_LEVELS.md | 81 +++++++ docs/API_SURFACE.md | 1 + docs/MIGRATION_INVENTORY.md | 2 +- docs/README.md | 1 + 26 files changed, 861 insertions(+), 12 deletions(-) create mode 100644 backend/app/api/agent_report.py create mode 100644 backend/app/services/agent_health_service.py create mode 100644 backend/app/services/permission_levels.py create mode 100644 backend/migrations/versions/112_agent_permission_levels.py create mode 100644 backend/scripts/seed_permission_demo.py create mode 100644 backend/tests/test_agent_permission_levels.py create mode 100644 backend/tests/test_seed_permission_demo.py create mode 100644 docs/AGENT_PERMISSION_LEVELS.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e447d1f..6357b9da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,15 @@ release history; historical `agent-v*` tags are not panel releases. ### Added +- Agent permission levels (Monitor / Protect / Full), enforced by the agent and + reported to the panel. Adds a signed `POST /api/v1/agent/report` endpoint for + report-only Monitor agents, per-server level and service-check state (server + list badge and health, server detail panel), offline / service-down alerts + through the existing fleet alerts and notification channels, audited level + changes, and a panel-side command gate. The panel cannot set the level; it is + changed on the server with `serverkit-agent permissions set`. See + [docs/AGENT_PERMISSION_LEVELS.md](docs/AGENT_PERMISSION_LEVELS.md). Migration + 112. The Add Server commands now pass `--level` / `-Level`. - `GET /api/v1/servers` now accepts an API key (`X-API-Key`) carrying the `servers:read` scope, in addition to the usual JWT, so external tools can poll the server list read-only without a short-lived token. JWT callers are diff --git a/SECURITY.md b/SECURITY.md index 2c693641..a6c941f1 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -47,6 +47,12 @@ trust boundaries: (`system:exec`) and interactive PTY sessions are controlled by the agent's `Features.Exec` flag, which is **off by default**. Enable it only on servers where you intend the panel to run shell commands. +- **Permission levels bound what a compromised panel can do.** An agent runs as + Monitor (report-only, no inbound command channel), Protect (security allowlist + only) or Full. The level is read only from the agent's local config and can + only be changed on the server (`serverkit-agent permissions set`); the panel + records and audits the reported level but has no API to set it. See + [docs/AGENT_PERMISSION_LEVELS.md](docs/AGENT_PERMISSION_LEVELS.md). - **Transport & connection controls.** Agents authenticate to the panel with per-connection HMAC-SHA256 (with nonce/replay protection and a timestamp-skew check), and the panel enforces a per-server IP allowlist. Use `wss://` diff --git a/backend/app/agent_gateway.py b/backend/app/agent_gateway.py index cefc2de4..7dfb17fa 100644 --- a/backend/app/agent_gateway.py +++ b/backend/app/agent_gateway.py @@ -136,7 +136,10 @@ class AgentNamespace(Namespace): return metrics = data.get('metrics', {}) - agent_registry.ingest_agent_state(agent, metrics=metrics) + agent_registry.ingest_agent_state( + agent, metrics=metrics, + permission_level=data.get('permission_level'), + service_checks=data.get('service_checks')) emit('heartbeat_ack', {'type': 'heartbeat_ack'}) diff --git a/backend/app/api/agent_poll.py b/backend/app/api/agent_poll.py index e63f27bd..11451655 100644 --- a/backend/app/api/agent_poll.py +++ b/backend/app/api/agent_poll.py @@ -108,7 +108,9 @@ def poll(): # Shared transport-neutral ingest: capability # side-effects (e.g. tunnel reconcile) fire exactly as on the WS path. agent_registry.ingest_agent_state(agent, metrics=metrics, sysinfo=sysinfo, - capabilities=caps) + capabilities=caps, + permission_level=body.get('permission_level'), + service_checks=body.get('service_checks')) # Long-poll up to 25s for any queued command. Below the typical # tunnel idle-timeout (Cloudflare ~100s, ngrok ~60s) so we never diff --git a/backend/app/api/agent_report.py b/backend/app/api/agent_report.py new file mode 100644 index 00000000..870c74cd --- /dev/null +++ b/backend/app/api/agent_report.py @@ -0,0 +1,53 @@ +"""Monitor-mode agent report endpoint. + +``POST /api/v1/agent/report`` is the ONLY channel a monitor-level agent uses: +a signed, outbound-only HTTPS POST. The reply never carries commands. + +Auth (no JWT/CSRF; the HMAC is the credential): + X-Agent-Key: -> server looked up by its key prefix + X-Timestamp: -> |skew| <= 300s + X-Nonce: =32 chars> -> single use (TTL cache, 5 min) + X-Signature: hex(HMAC_SHA256(api_secret, ts + "." + nonce + "." + sha256hex(body))) +""" + +from flask import Blueprint, jsonify, request + +from app import limiter +from app.services import agent_health_service, permission_levels +from app.utils.ip_utils import is_ip_allowed + + +agent_report_bp = Blueprint('agent_report', __name__) + +MAX_BODY_BYTES = 64 * 1024 +MAX_SKEW_SECONDS = 300 + + +def _rate_key(): + return f"{request.remote_addr}:{(request.headers.get('X-Agent-Key') or '')[:12]}" + + +@agent_report_bp.route('/report', methods=['POST']) +@limiter.limit("30 per minute", key_func=_rate_key) +def report(): + if (request.content_length or 0) > MAX_BODY_BYTES: + return jsonify({'error': 'payload too large'}), 413 + raw = request.get_data(cache=True) + if len(raw) > MAX_BODY_BYTES: + return jsonify({'error': 'payload too large'}), 413 + + server = agent_health_service.authenticate_report(raw, request.headers, MAX_SKEW_SECONDS) + if not server: + return jsonify({'error': 'authentication failed'}), 401 + if server.allowed_ips and not is_ip_allowed(request.remote_addr, server.allowed_ips): + return jsonify({'error': 'IP not allowed'}), 403 + + body = request.get_json(silent=True) + if not isinstance(body, dict): + return jsonify({'error': 'JSON object required'}), 400 + level = body.get('permission_level') + if level not in permission_levels.LEVELS: + return jsonify({'error': 'permission_level must be monitor, protect or full'}), 400 + + interval = agent_health_service.ingest_report(server, level, body) + return jsonify({'ok': True, 'interval_seconds': interval}) diff --git a/backend/app/api/servers.py b/backend/app/api/servers.py index b1c81b8e..c935df8f 100644 --- a/backend/app/api/servers.py +++ b/backend/app/api/servers.py @@ -13,6 +13,7 @@ from flask_jwt_extended import jwt_required, get_jwt_identity from sqlalchemy.orm import joinedload from app import db, limiter +from app.services import permission_levels from app.services.server_metrics_service import latest_metrics_by_server from app.api._query import apply_query, QueryParseError from app.api._request import json_object @@ -440,6 +441,8 @@ def create_server(): registered_by=user_id, workspace_id=ws_id, registration_token_expires=expires_at, + # What the install command asks for; the agent's report is the truth. + requested_permission_level=permission_levels.normalize(data.get('requested_level')), ) server.set_registration_token(registration_token) @@ -718,6 +721,7 @@ def regenerate_token(server_id): registration_token = Server.generate_registration_token() server.set_registration_token(registration_token) server.registration_token_expires = expires_at + server.requested_permission_level = permission_levels.normalize(data.get('requested_level')) server.status = 'pending' server.agent_id = None @@ -792,6 +796,10 @@ def register_agent(): server.total_disk = system_info.get('total_disk', server.total_disk) server.agent_version = data.get('agent_version') + # Level is whatever the agent says it was installed with; the panel never + # sets it. A mismatch with the requested level is surfaced in the UI. + from app.services import agent_health_service + agent_health_service.record_level(server, data.get('permission_level')) # Replace the panel-issued placeholder name with whatever the agent # reports — preferring the OS hostname over the agent's optional diff --git a/backend/app/api/servers_agents.py b/backend/app/api/servers_agents.py index db47e704..c9880829 100644 --- a/backend/app/api/servers_agents.py +++ b/backend/app/api/servers_agents.py @@ -5,6 +5,7 @@ import os import re import requests from app.models.server import AgentVersion, Server +from app.services import permission_levels from flask import Response, current_app, jsonify, redirect, request from app.middleware.rbac import admin_required, developer_required from app.exceptions import agent_offline, field_required @@ -178,8 +179,11 @@ def get_install_instructions(server_id): # Get base URL base_url = _get_external_base_url() api_url = f"{base_url}/api/v1/servers" + level = (permission_levels.normalize(request.args.get('level')) + or server.requested_permission_level or 'monitor') return jsonify({ + 'permission_level': level, 'linux': { # Download-then-run rather than `curl … | sudo bash`: in a pipeline # the shell reports bash's exit status, so a failed download exits 0 @@ -187,7 +191,7 @@ def get_install_instructions(server_id): 'one_liner': ( f'curl -fsSL {api_url}/install.sh -o /tmp/serverkit-agent-install.sh ' f'&& sudo bash /tmp/serverkit-agent-install.sh ' - f'--token "YOUR_TOKEN" --server "{base_url}"' + f'--token "YOUR_TOKEN" --server "{base_url}" --level {level}' ), 'manual': [ f'# Download the script', @@ -195,17 +199,17 @@ def get_install_instructions(server_id): f'chmod +x install.sh', f'', f'# Run installation', - f'sudo ./install.sh --token "YOUR_TOKEN" --server "{base_url}"' + f'sudo ./install.sh --token "YOUR_TOKEN" --server "{base_url}" --level {level}' ] }, 'windows': { - 'one_liner': f'irm {api_url}/install.ps1 | iex; Install-ServerKitAgent -Token "YOUR_TOKEN" -Server "{base_url}"', + 'one_liner': f'irm {api_url}/install.ps1 | iex; Install-ServerKitAgent -Token "YOUR_TOKEN" -Server "{base_url}" -Level {level}', 'manual': [ f'# Download the script (run in PowerShell as Administrator)', f'Invoke-WebRequest -Uri "{api_url}/install.ps1" -OutFile install.ps1', f'', f'# Run installation', - f'.\\install.ps1 -Token "YOUR_TOKEN" -Server "{base_url}"' + f'.\\install.ps1 -Token "YOUR_TOKEN" -Server "{base_url}" -Level {level}' ] }, 'note': 'Replace YOUR_TOKEN with the registration token shown in the UI' diff --git a/backend/app/core_blueprints.py b/backend/app/core_blueprints.py index 2e815888..4743fbdc 100644 --- a/backend/app/core_blueprints.py +++ b/backend/app/core_blueprints.py @@ -46,6 +46,7 @@ class BlueprintSpec: CORE_BLUEPRINTS: tuple[BlueprintSpec, ...] = ( BlueprintSpec('app.api.auth', 'auth_bp', '/api/v1/auth'), BlueprintSpec('app.api.agent_poll', 'agent_poll_bp', '/api/v1/agent'), + BlueprintSpec('app.api.agent_report', 'agent_report_bp', '/api/v1/agent'), BlueprintSpec('app.api.linked_panel', 'linked_panel_bp', '/api/v1/linked-panel'), BlueprintSpec('app.api.apps', 'apps_bp', '/api/v1/apps'), BlueprintSpec('app.api.apps', 'apps_bp', '/api/v1/services', name='services'), diff --git a/backend/app/jobs/builtin_handlers.py b/backend/app/jobs/builtin_handlers.py index ea0e1446..7708733a 100644 --- a/backend/app/jobs/builtin_handlers.py +++ b/backend/app/jobs/builtin_handlers.py @@ -534,7 +534,7 @@ def _notify_fleet_alerts(opened, resolved): 'metric': alert.metric, 'value': alert.value, 'threshold': alert.threshold, - 'message': ( + 'message': alert.detail or ( f'{hostname}: {alert.metric} averaged {alert.value} over ' f'{alert.duration_seconds}s, past the ' f'{alert.severity} threshold of {alert.threshold}.'), @@ -555,7 +555,9 @@ def _notify_fleet_alerts(opened, resolved): 'hostname': hostname, 'alert_type': f'{alert.metric} recovered', 'metric': alert.metric, - 'message': (f'{hostname}: {alert.metric} is back under its ' + 'message': (f'{hostname}: {alert.metric} recovered.' + if alert.detail else + f'{hostname}: {alert.metric} is back under its ' f'threshold.'), }, ) diff --git a/backend/app/models/metric_alert.py b/backend/app/models/metric_alert.py index 24e29893..7bb5f999 100644 --- a/backend/app/models/metric_alert.py +++ b/backend/app/models/metric_alert.py @@ -49,6 +49,8 @@ class MetricAlert(db.Model): threshold = db.Column(db.Float) # the threshold exceeded duration_seconds = db.Column(db.Integer) # how long it was exceeded + detail = db.Column(db.Text) # human message for offline / service-check alerts + status = db.Column(db.String(20), default='active', index=True) # active, acknowledged, resolved acknowledged_by = db.Column(db.Integer, db.ForeignKey('users.id'), nullable=True, index=True) @@ -67,6 +69,7 @@ class MetricAlert(db.Model): 'value': self.value, 'threshold': self.threshold, 'duration_seconds': self.duration_seconds, + 'detail': self.detail, 'status': self.status, 'acknowledged_by': self.acknowledged_by, 'created_at': self.created_at.isoformat() if self.created_at else None, diff --git a/backend/app/models/server.py b/backend/app/models/server.py index ba6e9e80..7b011715 100644 --- a/backend/app/models/server.py +++ b/backend/app/models/server.py @@ -126,6 +126,17 @@ class Server(TimestampMixin, JsonColumnMixin, db.Model): allow_agent_update_observed = db.Column(db.Boolean, nullable=False, default=False, server_default='0') + # Agent permission level (monitor|protect|full). REPORTED BY THE AGENT + # only -- no panel API writes it. NULL = unknown/legacy, treated as full. + # requested_permission_level is what the install command asked for, kept + # only to flag a mismatch with what the agent reports. + permission_level = db.Column(db.String(16), nullable=True) + permission_level_updated_at = db.Column(db.DateTime, nullable=True) + requested_permission_level = db.Column(db.String(16), nullable=True) + last_report_at = db.Column(db.DateTime, nullable=True) + report_interval_seconds = db.Column(db.Integer, nullable=True) + service_checks = db.Column(db.JSON, nullable=True) # latest state per check + @property def is_managed(self): """False only for observed boxes.""" @@ -490,6 +501,12 @@ class Server(TimestampMixin, JsonColumnMixin, db.Model): 'last_error': self.last_error, 'management_mode': self.management_mode or 'managed', 'allow_agent_update_observed': bool(self.allow_agent_update_observed), + 'permission_level': self.permission_level, + 'permission_level_effective': self.permission_level or 'full', + 'permission_level_updated_at': self.permission_level_updated_at.isoformat() if self.permission_level_updated_at else None, + 'requested_permission_level': self.requested_permission_level, + 'last_report_at': self.last_report_at.isoformat() if self.last_report_at else None, + 'service_checks': self.service_checks or [], 'onboarding_state': self.onboarding_state, 'onboarding_updated_at': self.onboarding_updated_at.isoformat() if self.onboarding_updated_at else None, 'agent_version': self.agent_version, diff --git a/backend/app/services/agent_health_service.py b/backend/app/services/agent_health_service.py new file mode 100644 index 00000000..2272469a --- /dev/null +++ b/backend/app/services/agent_health_service.py @@ -0,0 +1,223 @@ +"""Agent-reported health: permission level, service checks, silence, alerts. + +Everything here consumes what the agent REPORTS (registration, auth, heartbeat, +or the monitor-mode ``/agent/report`` POST). Alerts reuse ``MetricAlert`` and the +fleet notification path; one active row per (server, metric) de-duplicates. +""" +import hashlib +import hmac +import logging +import time +from datetime import datetime, timedelta + +from app import db +from app.models.audit_log import AuditLog +from app.models.metric_alert import MetricAlert +from app.models.server import Server +from app.services import permission_levels +from app.services.nonce_service import nonce_service + +logger = logging.getLogger(__name__) + +MIN_SILENCE_SECONDS = 180 # monitor agents: offline after max(3 min, 3x interval) +DEFAULT_INTERVAL_SECONDS = 60 +DEFAULT_INTERVAL = DEFAULT_INTERVAL_SECONDS +OFFLINE_METRIC = 'offline' +OPEN = ('active', 'acknowledged') +BAD = ('down',) + + +def _notify(opened=(), resolved=()): + if not opened and not resolved: + return + try: + from app.jobs.builtin_handlers import _notify_fleet_alerts + _notify_fleet_alerts(list(opened), list(resolved)) + except Exception: + logger.exception('Could not notify agent health alerts') + + +def _open_alert(server, metric, detail): + """Open an alert unless one is already open. Returns it if newly opened.""" + if MetricAlert.query.filter(MetricAlert.server_id == server.id, + MetricAlert.metric == metric, + MetricAlert.status.in_(OPEN)).first(): + return None + alert = MetricAlert(server_id=server.id, metric=metric, severity='critical', + detail=detail, status='active') + db.session.add(alert) + return alert + + +def _resolve_alerts(server, metric): + rows = MetricAlert.query.filter(MetricAlert.server_id == server.id, + MetricAlert.metric == metric, + MetricAlert.status.in_(OPEN)).all() + for row in rows: + row.status = 'resolved' + row.resolved_at = datetime.utcnow() + return rows + + +def record_level(server, reported): + """Persist a level reported by the agent; audit when it changes. + + Invalid/missing values are ignored. Escalations (monitor->protect->full) are + logged like any change but flagged, since they mean someone re-ran the + local confirmation on the box. + """ + level = permission_levels.normalize(reported) + if level is None: + return + old = server.permission_level + if old == level: + return + server.permission_level = level + server.permission_level_updated_at = datetime.utcnow() + AuditLog.log( + 'server.permission_level_changed', target_type='server', target_id=server.id, + details={'server_id': server.id, 'from': old, 'to': level, + 'escalation': permission_levels.is_escalation(old, level), + 'source': 'agent_report'}) + logger.warning('Server %s reported permission level %s -> %s', server.id, old, level) + + +def record_service_checks(server, checks): + """Store the latest per-check state and open/resolve alerts on transitions.""" + if not isinstance(checks, list): + return + previous = {c.get('name'): c.get('status') for c in (server.service_checks or [])} + clean, opened, resolved = [], [], [] + for raw in checks[:50]: + if not isinstance(raw, dict) or not isinstance(raw.get('name'), str): + continue + item = {k: (str(raw.get(k))[:200] if raw.get(k) is not None else None) + for k in ('name', 'kind', 'status', 'detail', 'checked_at')} + item['name'] = item['name'][:60] + if item['status'] not in ('up', 'down', 'degraded', 'unknown'): + item['status'] = 'unknown' + clean.append(item) + metric = f"svc:{item['name']}"[:20] + if item['status'] == 'down': + alert = _open_alert( + server, metric, + f"{server.name}: service '{item['name']}' is down since " + f"{datetime.utcnow():%Y-%m-%d %H:%M} UTC" + + (f" ({item['detail']})" if item['detail'] else '')) + if alert: + opened.append(alert) + elif item['status'] == 'up' or (item['status'] == 'degraded' + and previous.get(item['name']) == 'down'): + resolved += _resolve_alerts(server, metric) + server.service_checks = clean + db.session.flush() + _notify(opened, resolved) + + +def mark_offline(server, reason): + """Open the (de-duplicated) offline alert. Caller commits.""" + since = server.last_report_at or server.last_seen or datetime.utcnow() + alert = _open_alert( + server, OFFLINE_METRIC, + f"{server.name} is offline since {since:%Y-%m-%d %H:%M} UTC: {reason}") + db.session.flush() + _notify([alert] if alert else []) + + +def mark_online(server): + resolved = _resolve_alerts(server, OFFLINE_METRIC) + db.session.flush() + _notify(resolved=resolved) + + +def silence_limit(server): + interval = server.report_interval_seconds or DEFAULT_INTERVAL_SECONDS + return timedelta(seconds=max(MIN_SILENCE_SECONDS, 3 * interval)) + + +def sweep_silent_reporters(now=None): + """Flip report-only (monitor) servers offline once their reports stop. + + Reports are not a socket, so the registry's heartbeat reaper never sees + them. Only servers that have ever reported are considered. + """ + now = now or datetime.utcnow() + flipped = [] + for server in Server.query.filter(Server.permission_level == 'monitor', + Server.last_report_at.isnot(None), + Server.status != 'offline').all(): + if now - server.last_report_at > silence_limit(server): + server.status = 'offline' + server.last_error = 'Agent stopped reporting' + mark_offline(server, 'no report received') + flipped.append(server.id) + if flipped: + db.session.commit() + return flipped + + +def authenticate_report(raw, headers, max_skew): + """Return the Server for a validly signed report request, else None.""" + key = headers.get('X-Agent-Key') or '' + ts = headers.get('X-Timestamp') or '' + nonce = headers.get('X-Nonce') or '' + signature = headers.get('X-Signature') or '' + if not (key and ts and signature) or len(nonce) < 32: + return None + try: + if abs(time.time() - int(ts)) > max_skew: + return None + except ValueError: + return None + + prefix = key[:12] + server = Server.query.filter( + (Server.api_key_prefix == prefix) | (Server.api_key_pending_prefix == prefix) + ).first() + if not server: + return None + pending = (server.api_key_pending_prefix == prefix and server.api_key_prefix != prefix + and server.api_key_rotation_expires + and datetime.utcnow() <= server.api_key_rotation_expires) + secret = server.get_pending_api_secret() if pending else server.get_api_secret() + if not secret: + return None + + message = f"{ts}.{nonce}.{hashlib.sha256(raw).hexdigest()}" + expected = hmac.new(secret.encode(), message.encode(), hashlib.sha256).hexdigest() + if not hmac.compare_digest(signature, expected): + return None + # Consume the nonce only after the signature proves valid. + if not nonce_service.check_and_record(server.id, nonce): + return None + return server + + +def ingest_report(server, level, body): + """Apply a verified report to the server row; returns the interval in use.""" + interval = body.get('interval_seconds') + interval = interval if isinstance(interval, int) and 5 <= interval <= 3600 else DEFAULT_INTERVAL + + now = datetime.utcnow() + was_offline = server.status != 'online' + server.status = 'online' + server.last_error = None + server.last_seen = now + server.last_report_at = now + server.report_interval_seconds = interval + if isinstance(body.get('agent_version'), str): + server.agent_version = body['agent_version'][:20] + record_level(server, level) + record_service_checks(server, body.get('service_checks')) + if was_offline: + mark_online(server) + db.session.commit() + + metrics = body.get('metrics') + if isinstance(metrics, dict): + from app.services.server_metrics_service import ServerMetricsService + ServerMetricsService.record_metrics(server.id, { + **{k: metrics.get(k) for k in ('cpu_percent', 'memory_percent', 'disk_percent')}, + 'extra': {k: metrics.get(k) for k in ('uptime_seconds', 'load1')}, + }) + return interval diff --git a/backend/app/services/agent_registry.py b/backend/app/services/agent_registry.py index 98162e0a..19f0c81c 100644 --- a/backend/app/services/agent_registry.py +++ b/backend/app/services/agent_registry.py @@ -22,6 +22,7 @@ from collections import defaultdict from app import db from app.models.server import Server, ServerCommand, AgentSession +from app.services import permission_levels # --------------------------------------------------------------------------- # Per-IP auth rate limiter — transport-neutral state shared by the WS @@ -245,6 +246,12 @@ class AgentRegistry: self._agents.pop(server_id, None) self._socket_to_server.pop(socket_id, None) + # Report-only (monitor) agents hold no socket; sweep them too. + if self._app is not None: + with self._app.app_context(): + from app.services import agent_health_service + agent_health_service.sweep_silent_reporters() + except Exception as e: logger.error("Error in heartbeat checker: %s", e) @@ -279,6 +286,8 @@ class AgentRegistry: if server: server.status = 'offline' server.last_error = 'Agent heartbeat timeout' + from app.services import agent_health_service + agent_health_service.mark_offline(server, 'heartbeat timeout') db.session.commit() # Mark session as inactive @@ -392,6 +401,8 @@ class AgentRegistry: # even for healthy connected agents. if ip_address and ip_address != 'unknown': server.ip_address = ip_address + from app.services import agent_health_service + agent_health_service.mark_online(server) db.session.commit() # Create session record @@ -519,6 +530,8 @@ class AgentRegistry: server.last_seen = now if server.status != 'online': server.status = 'online' + from app.services import agent_health_service + agent_health_service.mark_online(server) db.session.commit() # Update session latency @@ -589,6 +602,12 @@ class AgentRegistry: # Check permissions server = Server.query.get(server_id) + # Defence in depth: never send what the agent's reported level refuses. + refused = permission_levels.refusal( + server.permission_level if server else None, action) + if refused: + return {'success': False, 'error': refused, 'code': 'LEVEL_DENIED'} + if server and not server.has_permission(action): return { 'success': False, @@ -863,13 +882,15 @@ class AgentRegistry: # in-memory state — the adapter must not report success. if not session_token: return None, server, 'registration_failed' + self.record_agent_health(server.id, payload.get('permission_level')) logger.info("Agent %s authenticated successfully from %s (%s)", agent_id, ip_address, transport) return session_token, server, None def ingest_agent_state(self, agent, metrics=None, sysinfo=None, - capabilities=None): + capabilities=None, permission_level=None, + service_checks=None): """One ingest path for agent-reported state on BOTH transports. Owns the capability side-effects (the WireGuard tunnel reconcile @@ -882,6 +903,20 @@ class AgentRegistry: self.update_system_info(agent.server_id, sysinfo) if capabilities: self.update_capabilities(agent.server_id, capabilities) + if permission_level is not None or service_checks is not None: + self.record_agent_health(agent.server_id, permission_level, service_checks) + + def record_agent_health(self, server_id, permission_level=None, service_checks=None): + from app.services import agent_health_service + try: + server = Server.query.get(server_id) + if server: + agent_health_service.record_level(server, permission_level) + agent_health_service.record_service_checks(server, service_checks) + db.session.commit() + except Exception: + logger.exception("Error recording agent health") + db.session.rollback() def verify_agent_auth( self, diff --git a/backend/app/services/permission_levels.py b/backend/app/services/permission_levels.py new file mode 100644 index 00000000..c7af05f7 --- /dev/null +++ b/backend/app/services/permission_levels.py @@ -0,0 +1,56 @@ +"""Agent permission levels and the one command-gate table. + +The level is chosen on the server (``permissions.level`` in the agent's +config.yaml) and REPORTED to the panel. The panel never sets it. This module +is only the panel's defence in depth: it refuses to send a command the agent +would refuse anyway. ``PROTECT_ACTIONS`` must stay identical to the agent's +allowlist (docs/AGENT_PERMISSION_LEVELS.md; checked by a test). +""" + +LEVELS = ('monitor', 'protect', 'full') +_RANK = {level: i for i, level in enumerate(LEVELS)} +LABELS = {'monitor': 'Monitor', 'protect': 'Protect', 'full': 'Full'} + +PROTECT_ACTIONS = frozenset({ + 'firewall:allow_port', 'firewall:deny_port', 'firewall:status', + 'firewall:allow_ip', 'firewall:deny_ip', + 'fail2ban:status', 'fail2ban:ban', 'fail2ban:unban', + 'crowdsec:decisions:list', 'crowdsec:ban', 'crowdsec:unban', + 'cloudflare:origin_lock:status', 'cloudflare:origin_lock:apply', + 'cloudflare:origin_lock:remove', +}) + +# Signature-verified key rotation is not control; allowed at every level. +ALWAYS_ALLOWED = frozenset({'credential_update'}) + + +def normalize(level): + """Return a valid level string, or None for missing/unknown values.""" + level = level.strip().lower() if isinstance(level, str) else None + return level if level in _RANK else None + + +def effective_level(level): + """Unknown/legacy (None) means a pre-levels agent, i.e. full.""" + return normalize(level) or 'full' + + +def is_escalation(old, new): + return old is not None and _RANK[new] > _RANK[old] + + +def refusal(level, action): + """Message explaining why ``action`` is refused at ``level``, else None.""" + level = effective_level(level) + if level == 'full' or action in ALWAYS_ALLOWED: + return None + if level == 'protect' and action in PROTECT_ACTIONS: + return None + if level == 'monitor': + return (f"server is in Monitor mode: '{action}' refused. Monitor agents " + "are report-only and accept no commands. The level can only be " + "changed on the server itself (serverkit-agent permissions set).") + return (f"server is in Protect mode: '{action}' refused. Protect agents only " + "run firewall, fail2ban, CrowdSec and Cloudflare origin-lock actions. " + "The level can only be changed on the server itself " + "(serverkit-agent permissions set).") diff --git a/backend/app/services/server_timeline_service.py b/backend/app/services/server_timeline_service.py index 8da66702..40cd2978 100644 --- a/backend/app/services/server_timeline_service.py +++ b/backend/app/services/server_timeline_service.py @@ -52,6 +52,7 @@ _AUDIT_DETAIL_KEYS = frozenset({ 'application_id', 'code', 'endpoint', + 'escalation', 'from', 'kind', 'label', diff --git a/backend/migrations/versions/112_agent_permission_levels.py b/backend/migrations/versions/112_agent_permission_levels.py new file mode 100644 index 00000000..e65a5908 --- /dev/null +++ b/backend/migrations/versions/112_agent_permission_levels.py @@ -0,0 +1,36 @@ +"""Agent-reported permission level, report bookkeeping and service checks.""" +import sqlalchemy as sa +from alembic import op + +revision = '112_agent_permission_levels' +down_revision = '111_preview_runtime' +branch_labels = None +depends_on = None + +SERVER_COLUMNS = [ + ('permission_level', sa.String(16)), + ('permission_level_updated_at', sa.DateTime()), + ('requested_permission_level', sa.String(16)), + ('last_report_at', sa.DateTime()), + ('report_interval_seconds', sa.Integer()), + ('service_checks', sa.JSON()), +] + + +def upgrade(): + inspector = sa.inspect(op.get_bind()) + existing = {c['name'] for c in inspector.get_columns('servers')} + for name, kind in SERVER_COLUMNS: + if name not in existing: + op.add_column('servers', sa.Column(name, kind, nullable=True)) + existing = {c['name'] for c in inspector.get_columns('metric_alerts')} + if 'detail' not in existing: + op.add_column('metric_alerts', sa.Column('detail', sa.Text(), nullable=True)) + + +def downgrade(): + with op.batch_alter_table('metric_alerts') as batch: + batch.drop_column('detail') + with op.batch_alter_table('servers') as batch: + for name, _ in reversed(SERVER_COLUMNS): + batch.drop_column(name) diff --git a/backend/scripts/seed_permission_demo.py b/backend/scripts/seed_permission_demo.py new file mode 100644 index 00000000..a076facc --- /dev/null +++ b/backend/scripts/seed_permission_demo.py @@ -0,0 +1,80 @@ +"""Seed five demo servers showing every permission-level / health state. + +Dev sandbox only; never run automatically. Idempotent: demo rows are keyed by +agent_id 'demo-perm-*' and are rebuilt on each run. + + cd backend && python scripts/seed_permission_demo.py +""" +import os +import sys +from datetime import datetime, timedelta + +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + +from app import create_app, db # noqa: E402 +from app.models.metric_alert import MetricAlert # noqa: E402 +from app.models.server import Server, ServerMetrics # noqa: E402 + +UP, DOWN, DEG = 'up', 'down', 'degraded' + + +def checks(now, web=UP, php=UP, database=UP, disk=UP): + stamp = now.isoformat() + 'Z' + rows = [('nginx', 'web', web, ''), ('php8.2-fpm', 'php_fpm', php, 'slow pool' if php == DEG else ''), + ('mysql', 'database', database, 'connection refused on 3306' if database == DOWN else ''), + ('disk /', 'disk', disk, ''), ('cpu', 'cpu', UP, ''), ('memory', 'memory', UP, '')] + return [{'name': n, 'kind': k, 'status': s, 'detail': d, 'checked_at': stamp} for n, k, s, d in rows] + + +# (name, level, status, minutes since last report, check overrides, cpu) +DEMOS = [ + ('demo-monitor-healthy', 'monitor', 'online', 1, {}, 14.0), + ('demo-monitor-degraded', 'monitor', 'online', 1, {'database': DOWN, 'php': DEG}, 71.0), + ('demo-protect-healthy', 'protect', 'online', 0, {}, 22.0), + ('demo-full-healthy', 'full', 'online', 0, {}, 35.0), + ('demo-monitor-offline', 'monitor', 'offline', 20, {'database': DOWN}, 9.0), +] + + +def seed(): + now = datetime.utcnow() + for name, level, status, age, overrides, cpu in DEMOS: + agent_id = f'demo-perm-{name}' + old = Server.query.filter_by(agent_id=agent_id).first() + if old: + MetricAlert.query.filter_by(server_id=old.id).delete() + ServerMetrics.query.filter_by(server_id=old.id).delete() + db.session.delete(old) + db.session.flush() + reported = now - timedelta(minutes=age) + srv = Server(name=name, agent_id=agent_id, hostname=name, status=status, + os_type='linux', permission_level=level, requested_permission_level=level, + permission_level_updated_at=reported, last_seen=reported, + last_report_at=reported, report_interval_seconds=60, + service_checks=checks(reported, **overrides)) + db.session.add(srv) + db.session.flush() + for i in range(12): + db.session.add(ServerMetrics( + server_id=srv.id, timestamp=reported - timedelta(minutes=i), + cpu_percent=cpu + i % 3, memory_percent=48.0, disk_percent=61.0)) + for check in srv.service_checks: + if check['status'] == DOWN: + db.session.add(MetricAlert( + server_id=srv.id, metric=f"svc:{check['name']}"[:20], severity='critical', + status='active', created_at=reported, + detail=f"{name}: service '{check['name']}' is down since " + f"{reported:%Y-%m-%d %H:%M} UTC ({check['detail']})")) + if status == 'offline': + db.session.add(MetricAlert( + server_id=srv.id, metric='offline', severity='critical', status='active', + created_at=now, detail=f"{name} is offline since {reported:%Y-%m-%d %H:%M} UTC: " + "no report received")) + db.session.commit() + print(f'Seeded {len(DEMOS)} demo servers.') + + +if __name__ == '__main__': + app = create_app(os.environ.get('FLASK_ENV') or 'development') + with app.app_context(): + seed() diff --git a/backend/tests/test_agent_permission_levels.py b/backend/tests/test_agent_permission_levels.py new file mode 100644 index 00000000..b5ab40ab --- /dev/null +++ b/backend/tests/test_agent_permission_levels.py @@ -0,0 +1,208 @@ +"""Agent permission levels: report endpoint, level reporting, dispatch gate, +silence sweep, service-check alerts and install commands.""" +import hashlib +import hmac +import json +import re +import secrets +import time +from datetime import datetime, timedelta +from pathlib import Path + +import pytest + +from app import db +from app.models.audit_log import AuditLog +from app.models.metric_alert import MetricAlert +from app.models.server import Server +from app.services import agent_health_service, permission_levels +from app.services.agent_registry import ConnectedAgent, agent_registry + +REPORT = '/api/v1/agent/report' +SECRET = 'test-secret' + + +@pytest.fixture +def server(app, monkeypatch): + monkeypatch.setattr(Server, 'get_api_secret', lambda self: SECRET) + key, _ = Server.generate_api_credentials() + srv = Server(name='web-1', agent_id=secrets.token_hex(8)) + srv.set_api_key(key) + db.session.add(srv) + db.session.commit() + srv.test_key = key + return srv + + +def _post(client, srv, body=None, ts=None, nonce=None, secret=SECRET, raw=None): + body = body if body is not None else { + 'permission_level': 'monitor', 'interval_seconds': 60, + 'metrics': {'cpu_percent': 12.5, 'memory_percent': 40.0, 'disk_percent': 55.0, + 'uptime_seconds': 99, 'load1': 0.3}, + 'service_checks': []} + raw = raw if raw is not None else json.dumps(body).encode() + ts = str(int(time.time())) if ts is None else str(ts) + nonce = nonce or secrets.token_hex(16) + sig = hmac.new(secret.encode(), + f'{ts}.{nonce}.{hashlib.sha256(raw).hexdigest()}'.encode(), + hashlib.sha256).hexdigest() + return client.post(REPORT, data=raw, content_type='application/json', headers={ + 'X-Agent-Key': srv.test_key, 'X-Timestamp': ts, 'X-Nonce': nonce, + 'X-Signature': sig}) + + +def test_good_signature_updates_server(client, server): + resp = _post(client, server) + assert resp.status_code == 200 + assert resp.get_json() == {'ok': True, 'interval_seconds': 60} + srv = db.session.get(Server, server.id) + assert srv.status == 'online' and srv.last_report_at is not None + assert srv.permission_level == 'monitor' + assert 'commands' not in resp.get_json() + + +def test_bad_signature_rejected(client, server): + assert _post(client, server, secret='wrong').status_code == 401 + + +def test_stale_timestamp_rejected(client, server): + assert _post(client, server, ts=int(time.time()) - 400).status_code == 401 + + +def test_replayed_nonce_rejected(client, server): + nonce = secrets.token_hex(16) + assert _post(client, server, nonce=nonce).status_code == 200 + assert _post(client, server, nonce=nonce).status_code == 401 + + +def test_oversize_body_rejected(client, server): + assert _post(client, server, raw=b'{"x":"' + b'a' * 70000 + b'"}').status_code == 413 + + +def test_invalid_level_rejected(client, server): + assert _post(client, server, body={'permission_level': 'root'}).status_code == 400 + + +def test_level_persisted_and_escalation_audited(client, server): + _post(client, server, body={'permission_level': 'monitor'}) + _post(client, server, body={'permission_level': 'full'}) + rows = AuditLog.query.filter_by(action='server.permission_level_changed').order_by(AuditLog.id).all() + details = [r.get_details() for r in rows] + assert [(d['from'], d['to'], d['escalation']) for d in details] == [ + (None, 'monitor', False), ('monitor', 'full', True)] + assert db.session.get(Server, server.id).permission_level == 'full' + + +def test_no_api_sets_level(client, server, auth_headers): + resp = client.put(f'/api/v1/servers/{server.id}', headers=auth_headers, + json={'permission_level': 'full', 'name': 'x'}) + assert resp.status_code in (200, 400) + assert db.session.get(Server, server.id).permission_level is None + writers = [r.rule for r in client.application.url_map.iter_rules() + if 'level' in r.rule and r.methods & {'POST', 'PUT', 'PATCH'}] + assert writers == [] + + +def _connect(server_id): + agent_registry._agents[server_id] = ConnectedAgent( + server_id=server_id, socket_id='s', session_token='t', + connected_at=datetime.utcnow(), last_heartbeat=datetime.utcnow(), + ip_address='1.1.1.1', agent_version='1', transport='poll') + + +@pytest.mark.parametrize('level,action,refused', [ + ('monitor', 'firewall:status', True), + ('monitor', 'docker:container:list', True), + ('protect', 'docker:container:list', True), + ('protect', 'system:exec', True), + ('protect', 'firewall:status', False), + ('protect', 'cloudflare:origin_lock:apply', False), + ('protect', 'credential_update', False), + ('full', 'system:exec', False), + (None, 'system:exec', False), +]) +def test_refusal_table(level, action, refused): + assert bool(permission_levels.refusal(level, action)) is refused + + +@pytest.mark.parametrize('level', ['monitor', 'protect']) +def test_send_command_gate(server, level): + server.permission_level = level + db.session.commit() + _connect(server.id) + try: + result = agent_registry.send_command(server.id, 'system:exec', {}) + finally: + agent_registry._agents.pop(server.id, None) + assert result['code'] == 'LEVEL_DENIED' + assert result['error'].startswith(f'server is in {level.title()} mode') + + +def test_protect_allowlist_matches_documented_contract(): + doc = Path(__file__).parents[2] / 'docs/AGENT_PERMISSION_LEVELS.md' + block = re.search(r'```text allowlist\n(.*?)```', doc.read_text(), re.S).group(1) + assert set(block.split()) == set(permission_levels.PROTECT_ACTIONS) + + +def test_silent_monitor_goes_offline_with_one_alert(server): + server.permission_level = 'monitor' + server.status = 'online' + server.last_report_at = datetime.utcnow() - timedelta(minutes=20) + db.session.commit() + assert agent_health_service.sweep_silent_reporters() == [server.id] + assert agent_health_service.sweep_silent_reporters() == [] + assert db.session.get(Server, server.id).status == 'offline' + assert MetricAlert.query.filter_by(metric='offline', status='active').count() == 1 + + +def test_recent_monitor_stays_online(server): + server.permission_level, server.status = 'monitor', 'online' + server.last_report_at = datetime.utcnow() - timedelta(minutes=2) + db.session.commit() + assert agent_health_service.sweep_silent_reporters() == [] + + +def _checks(status): + return {'permission_level': 'monitor', 'service_checks': [ + {'name': 'mysql', 'kind': 'database', 'status': status, 'detail': 'refused', + 'checked_at': '2026-01-01T00:00:00Z'}]} + + +def test_service_down_alert_dedupes_and_resolves(client, server): + _post(client, server, body=_checks('up')) + assert MetricAlert.query.count() == 0 + _post(client, server, body=_checks('down')) + _post(client, server, body=_checks('down')) + alert = MetricAlert.query.one() + assert alert.status == 'active' and 'mysql' in alert.detail and 'web-1' in alert.detail + _post(client, server, body=_checks('up')) + assert MetricAlert.query.one().status == 'resolved' + + +def test_degraded_to_down_alerts_and_report_recovers_offline(client, server): + _post(client, server, body=_checks('degraded')) + assert MetricAlert.query.count() == 0 + _post(client, server, body=_checks('down')) + assert MetricAlert.query.filter_by(status='active').count() == 1 + agent_health_service.mark_offline(server, 'test') + db.session.commit() + server.status = 'offline' + db.session.commit() + _post(client, server, body=_checks('down')) + assert MetricAlert.query.filter_by(metric='offline', status='resolved').count() == 1 + + +def test_install_instructions_include_level(client, server, auth_headers): + server.set_registration_token('sk_reg_x') + db.session.commit() + data = client.get(f'/api/v1/servers/install-instructions/{server.id}?level=protect', + headers=auth_headers).get_json() + assert data['permission_level'] == 'protect' + assert '--level protect' in data['linux']['one_liner'] + assert '-Level protect' in data['windows']['one_liner'] + + +def test_token_records_requested_level(client, server, auth_headers): + client.post(f'/api/v1/servers/{server.id}/regenerate-token', headers=auth_headers, + json={'requested_level': 'protect'}) + assert db.session.get(Server, server.id).requested_permission_level == 'protect' diff --git a/backend/tests/test_core_blueprint_registry.py b/backend/tests/test_core_blueprint_registry.py index 3b4e86e4..beba6dfe 100644 --- a/backend/tests/test_core_blueprint_registry.py +++ b/backend/tests/test_core_blueprint_registry.py @@ -7,9 +7,9 @@ from pathlib import Path from app.core_blueprints import CORE_BLUEPRINTS -EXPECTED_CORE_BLUEPRINT_COUNT = 116 +EXPECTED_CORE_BLUEPRINT_COUNT = 117 EXPECTED_MANIFEST_SHA256 = ( - '25d28d92ccddddc246d5b2081d84b11f1df10cb662f33c256ebcbe390d2813d5' + '52abbc7429d079c7cf6ea61a638f5dc4dbd991e4f02ec31c81563e01442aa7fb' ) diff --git a/backend/tests/test_route_authz_static.py b/backend/tests/test_route_authz_static.py index a7a1e24d..0c842e91 100644 --- a/backend/tests/test_route_authz_static.py +++ b/backend/tests/test_route_authz_static.py @@ -145,6 +145,7 @@ PUBLIC_ALT_AUTH = { # Public by design; the value names the mechanism that authenticates the call. 'agent_poll.connect': 'agent HMAC handshake + per-IP throttle', 'agent_poll.disconnect': 'X-Session-Token lookup', + 'agent_report.report': 'HMAC over timestamp+nonce+body hash, skew/replay/rate limits', 'agent_poll.poll': 'X-Session-Token resolves the ConnectedAgent', 'agent_poll.result': 'X-Session-Token resolves the ConnectedAgent', 'auth.connect_session': 'loopback-only + Cloud grant verified against JWKS, 30/min', diff --git a/backend/tests/test_route_authz_sweep.py b/backend/tests/test_route_authz_sweep.py index 4265b385..d7af9e6f 100644 --- a/backend/tests/test_route_authz_sweep.py +++ b/backend/tests/test_route_authz_sweep.py @@ -221,6 +221,7 @@ VIEWER_WRITABLE = { 'docker.get_containers_stats', # PUBLIC transport — agent long-poll fallback; user JWT is ignored here. 'agent_poll.disconnect', + 'agent_report.report', # PUBLIC authentication challenge only; credential verification and UV are # required by passkey_authenticate before any session tokens are issued. 'auth.passkey_auth_options', diff --git a/backend/tests/test_seed_permission_demo.py b/backend/tests/test_seed_permission_demo.py new file mode 100644 index 00000000..c629bc81 --- /dev/null +++ b/backend/tests/test_seed_permission_demo.py @@ -0,0 +1,17 @@ +import importlib.util +from pathlib import Path + +from app.models.metric_alert import MetricAlert +from app.models.server import Server + + +def test_seed_is_idempotent(app): + path = Path(__file__).parents[1] / 'scripts/seed_permission_demo.py' + spec = importlib.util.spec_from_file_location('seed_demo', path) + mod = importlib.util.module_from_spec(spec) + spec.loader.exec_module(mod) + mod.seed() + mod.seed() + assert Server.query.filter(Server.agent_id.like('demo-perm-%')).count() == 5 + assert Server.query.filter_by(status='offline').count() == 1 + assert MetricAlert.query.filter_by(metric='offline').count() == 1 diff --git a/docs/AGENT_PERMISSION_LEVELS.md b/docs/AGENT_PERMISSION_LEVELS.md new file mode 100644 index 00000000..cd8d8286 --- /dev/null +++ b/docs/AGENT_PERMISSION_LEVELS.md @@ -0,0 +1,81 @@ +# Agent permission levels + +Each ServerKit agent runs at one of three levels. The level is chosen **on the +server**, enforced **by the agent**, and merely *reported* to the panel. + +| Level | What it can do | What it cannot do | +|-------|----------------|-------------------| +| **Monitor** (default for new installs) | Send CPU / memory / disk / uptime / load and service checks (web server, PHP-FPM, database, disk, CPU, memory) to the panel with signed outbound HTTPS POSTs. Opens no inbound command channel. | Run any command, open a terminal, touch files, Docker, packages or services. The panel cannot send it anything. | +| **Protect** | Everything in Monitor, plus a fixed security allowlist: firewall (ufw) rules, fail2ban, CrowdSec decisions, Cloudflare origin lock (restrict 80/443 to Cloudflare ranges). | Docker, shell, files, terminal, packages, systemd, cron, SSH keys, WireGuard, runtimes, agent updates. | +| **Full** | Today's behaviour: the whole agent feature set. Legacy installs with no level configured are treated as Full. | — | + +## Install + +The Add Server drawer shows the level picker and puts the choice in the command: + +```bash +curl -fsSL https://panel.example.com/api/v1/servers/install.sh -o /tmp/serverkit-agent-install.sh \ + && sudo bash /tmp/serverkit-agent-install.sh --token "TOKEN" --server "https://panel.example.com" --level monitor +``` + +```powershell +irm https://panel.example.com/api/v1/servers/install.ps1 | iex; Install-ServerKitAgent -Token "TOKEN" -Server "https://panel.example.com" -Level monitor +``` + +The installer scripts under `scripts/` are vendored from the agent repo +(`scripts/sync-agent-installers.sh`); `--level` / `-Level` arrives with the next sync. + +## Changing the level + +Only on the server itself, as root, with a typed confirmation: + +```bash +serverkit-agent permissions show +sudo serverkit-agent permissions set protect +``` + +There is no panel button or API for this, by design. Re-running `install.sh` with a +different `--level` on an installed box refuses unless `--reconfigure` is passed. + +## What the panel does + +- Records the level the agent reports (registration, auth, heartbeat, report). Every + change, escalations included, is written to the audit log and shown in the server + timeline. The Add Server flow remembers the *requested* level so a mismatch with + the reported one is visible. +- Monitor agents POST to `/api/v1/agent/report` (HMAC over timestamp, nonce and body + hash; 300 s skew; single-use nonces; 64 KB cap; per-IP+key rate limit). A monitor + server with no report for max(3 minutes, 3 x its interval) is marked offline. +- Opens an alert (existing fleet alerts + notification channels) when a server goes + offline or stops reporting and when a service check goes down; it resolves on + recovery and does not repeat while the condition persists. +- Refuses to dispatch a command the reported level forbids (`LEVEL_DENIED`, + "server is in Monitor mode: ..."). This is defence in depth; the agent enforces + the same table. The table lives in `backend/app/services/permission_levels.py`. + +Protect allowlist (checked against the panel table by a test): + +```text allowlist +firewall:allow_port firewall:deny_port firewall:status +firewall:allow_ip firewall:deny_ip +fail2ban:status fail2ban:ban fail2ban:unban +crowdsec:decisions:list crowdsec:ban crowdsec:unban +cloudflare:origin_lock:status cloudflare:origin_lock:apply cloudflare:origin_lock:remove +``` + +`credential_update` (signature-verified key rotation) is allowed at every level. + +## Threat model + +The level is read only from the agent's local config at startup; no message from +the panel can change it. A compromised panel therefore **cannot escalate** a Monitor +agent: it has no channel to send commands to, and the report reply never carries any. +The panel's own gate only narrows what it will send. Someone with root on the box +can still change the level, which is the intended re-confirmation path, and the +panel audits the resulting change. A compromised panel can lie in the UI, but +cannot make a Monitor agent act. + +## Demo data + +`python backend/scripts/seed_permission_demo.py` (never run automatically) creates five +demo servers for the dev sandbox. It is idempotent. diff --git a/docs/API_SURFACE.md b/docs/API_SURFACE.md index 59f85051..56c8c308 100644 --- a/docs/API_SURFACE.md +++ b/docs/API_SURFACE.md @@ -755,6 +755,7 @@ Regenerate (backend/): - `POST /agent/connect` - `POST /agent/disconnect` - `POST /agent/poll` +- `POST /agent/report` - `POST /agent/result` - `POST /ai/chat` - `POST /ai/chat/cancel` diff --git a/docs/MIGRATION_INVENTORY.md b/docs/MIGRATION_INVENTORY.md index fdb4e968..f8323690 100644 --- a/docs/MIGRATION_INVENTORY.md +++ b/docs/MIGRATION_INVENTORY.md @@ -16,7 +16,7 @@ debt. Regenerate with `python scripts/generate-migration-inventory.py`. | Routes on bare @jwt_required() | auth_required() / role decorators | 598 | 598 | REGISTERED EXCEPTION: JWT-only is the deliberate default; conversion grants API-key access and happens per route, on decision | | HTTP statuses chosen by sniffing error text | typed errors from app.exceptions | 0 | 0 | INVARIANT at 0 - migration completed 2026-08-19 | | API crashes swallowed without recording | app.error_reporting | 0 | 0 | INVARIANT at 0 | -| Hand-shaped {'error': ...} bodies in app/api | typed errors + the global handler | 849 | 850 | migrate when touched; new endpoints raise | +| Hand-shaped {'error': ...} bodies in app/api | typed errors + the global handler | 855 | 850 | migrate when touched; new endpoints raise | | Raw subprocess calls outside the runners | app/utils/system.py runners | 23 | 23 | migrate when touched | | Controller-boundary violations (routes doing service work) | service layer extraction | 453 | 453 | migrate when touched (first-wave ratchet) | | raw api.* calls in pages/ | E1: useServerQuery/useServerMutation | 374 | 398 | migrate when touched | diff --git a/docs/README.md b/docs/README.md index 25d3a1f5..59c100f0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -11,6 +11,7 @@ Welcome to the ServerKit documentation. This guide will help you install, config | [Video: template to live app](https://youtu.be/TXfXFz6bVjs) | Watch a 4-minute AgentSite deployment through the template catalog and live Deploy Console | | [Video: deploy a Git repository](https://youtu.be/Fv28qMERYDU) | Connect a repository, review detected settings and deploy through the three-step New Service wizard | | [Installation Guide](INSTALLATION.md) | Complete setup instructions for Docker and manual installation | +| [Agent permission levels](AGENT_PERMISSION_LEVELS.md) | Monitor / Protect / Full: what each allows and how to change it | | [Architecture](ARCHITECTURE.md) | System design, request flow, and diagrams | | [Deployment Guide](DEPLOYMENT.md) | Production deployment, CLI commands, and configuration | | [Local Development](LOCAL_DEVELOPMENT.md) | Run the panel locally for development | From a0662254aec8d7effacc2072b255347b6f5a9c6a Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Tue, 3 Nov 2026 00:07:37 -0500 Subject: [PATCH 048/171] feat(frontend): permission level picker, level badge, health and service checks Co-Authored-By: Claude Sonnet 5.5 --- .../serverdetail/ServerHealthCard.jsx | 102 ++++++++++++++++ .../serverdetail/ServerOverviewTab.jsx | 3 + frontend/src/i18n/locales/en.json | 37 ++++++ frontend/src/pages/Incidents.jsx | 5 +- frontend/src/pages/Servers.jsx | 114 ++++++++++++++++-- frontend/src/styles/pages/_servers.scss | 43 +++++++ .../__tests__/agentPermissionLevel.test.mjs | 28 +++++ frontend/src/utils/agentPermissionLevel.js | 53 ++++++++ 8 files changed, 376 insertions(+), 9 deletions(-) create mode 100644 frontend/src/components/serverdetail/ServerHealthCard.jsx create mode 100644 frontend/src/utils/__tests__/agentPermissionLevel.test.mjs create mode 100644 frontend/src/utils/agentPermissionLevel.js diff --git a/frontend/src/components/serverdetail/ServerHealthCard.jsx b/frontend/src/components/serverdetail/ServerHealthCard.jsx new file mode 100644 index 00000000..9a97d277 --- /dev/null +++ b/frontend/src/components/serverdetail/ServerHealthCard.jsx @@ -0,0 +1,102 @@ +import { useEffect, useState } from 'react'; +import api from '../../services/api'; +import { DataTable, Pill } from '@/components/ds'; +import { InfoList, InfoItem } from '../InfoList'; +import { useTranslation } from 'react-i18next'; +import { formatDateTime } from '@/utils/intl'; +import { levelKind, serverHealth } from '@/utils/agentPermissionLevel'; + +const SET_HINT = 'serverkit-agent permissions set '; + +const checkKind = (status) => { + if (status === 'up') return 'green'; + if (status === 'down') return 'red'; + if (status === 'degraded') return 'amber'; + return 'gray'; +}; + +// Read-only by design: the permission level is enforced by the agent and can +// only be changed on the server itself, so there is deliberately no control. +const ServerHealthCard = ({ server }) => { + const { t } = useTranslation(); + const [alerts, setAlerts] = useState([]); + + useEffect(() => { + let alive = true; + api.getFleetAlerts({ server_id: server.id, status: 'active', limit: 20 }) + .then((res) => { if (alive) setAlerts((Array.isArray(res) ? res : []).filter((a) => a.detail)); }) + .catch(() => { if (alive) setAlerts([]); }); + return () => { alive = false; }; + }, [server.id, server.status, server.last_report_at]); + + const level = server.permission_level_effective || 'full'; + const health = serverHealth(server); + const mismatch = server.requested_permission_level + && server.permission_level + && server.requested_permission_level !== server.permission_level; + const levelName = { + monitor: t('app.serverHealthCard.monitor', 'Monitor'), + protect: t('app.serverHealthCard.protect', 'Protect'), + full: t('app.serverHealthCard.full', 'Full'), + }[level]; + + const columns = [ + { key: 'name', headerKey: 'app.serverHealthCard.service', header: 'Service', sortable: false, hideable: false, render: (c) => c.name }, + { key: 'kind', headerKey: 'app.serverHealthCard.kind', header: 'Kind', sortable: false, cellClassName: 'sk-cell-dim', render: (c) => c.kind || '—' }, + { key: 'status', headerKey: 'common.labels.status', header: 'Status', sortable: false, render: (c) => {c.status} }, + { key: 'detail', headerKey: 'app.serverHealthCard.detail', header: 'Detail', sortable: false, cellClassName: 'sk-cell-dim', render: (c) => c.detail || '—' }, + { key: 'checked', headerKey: 'app.serverHealthCard.lastChecked', header: 'Last checked', sortable: false, cellClassName: 'sk-cell-dim', render: (c) => (c.checked_at ? formatDateTime(c.checked_at) : '—') }, + ]; + + return ( + <> +
+

{t('app.serverHealthCard.permissionLevel', 'Permission level')}

+ + + {levelName} + {!server.permission_level && ( + {t('app.serverHealthCard.legacyAgent', 'Not reported (legacy agent, treated as Full)')} + )} + + + + {mismatch && ( +

+ {t('app.serverHealthCard.mismatch', 'The install command requested a different level than the agent reports. The agent\'s level is the one in effect.')} +

+ )} +

+ {t('app.serverHealthCard.howToChange', 'This level is enforced by the agent and cannot be changed from the panel. To change it, run this on the server as root:')} +

+ {SET_HINT} +
+ +
+

{t('app.serverHealthCard.health', 'Health')} {health.code}

+ {server.last_report_at && ( +

+ {t('app.serverHealthCard.lastReport', 'Last report')}: {formatDateTime(server.last_report_at)} +

+ )} + {alerts.length > 0 && ( +
    + {alerts.map((a) =>
  • {a.detail}
  • )} +
+ )} + +
+ + ); +}; + +export default ServerHealthCard; diff --git a/frontend/src/components/serverdetail/ServerOverviewTab.jsx b/frontend/src/components/serverdetail/ServerOverviewTab.jsx index 909867fb..0dcba474 100644 --- a/frontend/src/components/serverdetail/ServerOverviewTab.jsx +++ b/frontend/src/components/serverdetail/ServerOverviewTab.jsx @@ -2,6 +2,7 @@ import { serverStatusKind } from './serverDetailData'; import { Pill, KpiBand } from '../ds'; import OnboardingWizard from '../server/OnboardingWizard'; import SystemStatusCard from './SystemStatusCard'; +import ServerHealthCard from './ServerHealthCard'; import { formatBytes } from '@/utils/formatBytes'; import { InfoList, InfoItem } from '../InfoList'; import { useTranslation } from 'react-i18next'; @@ -163,6 +164,8 @@ const ServerOverviewTab = ({ server, metrics, systemInfo, onRefreshServer }) => + +
diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index 23a8d25e..02a7c335 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -5443,6 +5443,24 @@ "theAgentUserIsnTIn": "The agent user isn't in the", "theNpipeSocket": "The npipe socket" }, + "serverHealthCard": { + "changedAt": "Last change", + "detail": "Detail", + "full": "Full", + "health": "Health", + "howToChange": "This level is enforced by the agent and cannot be changed from the panel. To change it, run this on the server as root:", + "kind": "Kind", + "lastChecked": "Last checked", + "lastReport": "Last report", + "legacyAgent": "Not reported (legacy agent, treated as Full)", + "level": "Level", + "mismatch": "The install command requested a different level than the agent reports. The agent's level is the one in effect.", + "monitor": "Monitor", + "noChecks": "No service checks reported yet.", + "permissionLevel": "Permission level", + "protect": "Protect", + "service": "Service" + }, "serverKitLogo": { "serverkitLogo": "ServerKit logo" }, @@ -5674,10 +5692,28 @@ "groupDeleted": "Group deleted", "groupUpdated": "Group updated", "groups": "Groups", + "health": "Health", + "healthDegraded": "Degraded", + "healthFailing": "Failing", + "healthHealthy": "Healthy", + "healthOffline": "Offline", + "healthPending": "Pending", + "healthStale": "Stale", "host": "Host", "hostname": "Hostname:", "lastSeen": "Last seen", "leaveBlankToUseTheAgent": "Leave blank to use the agent's hostname.", + "levelColumn": "Level", + "levelEnforcedByAgent": "The level is enforced by the agent and can only be changed on the server itself, with", + "levelFull": "Full", + "levelFullCan": "Everything the agent supports: Docker, files, terminal, packages, services and more.", + "levelFullCannot": "No restrictions. Choose this only for servers you want this panel to fully manage.", + "levelMonitor": "Monitor", + "levelMonitorCan": "Reports CPU, memory, disk and service health (web server, PHP-FPM, database) to this panel.", + "levelMonitorCannot": "Cannot run commands, open a terminal or change anything. The panel cannot send it any instructions.", + "levelProtect": "Protect", + "levelProtectCan": "Everything in Monitor, plus firewall, fail2ban, CrowdSec and Cloudflare origin-lock actions.", + "levelProtectCannot": "Cannot touch Docker, files, packages, services, shell or updates.", "linkPanel": "Link panel", "linux": "Linux", "manageServerGroups": "Manage server groups", @@ -5700,6 +5736,7 @@ "passphrase": "Passphrase *", "pasteThisIntoTheAgentOr": "Paste this into the agent, or run the installer.", "pending": "Pending", + "permissionLevel": "Permission level", "runAsAdministrator": "Run as administrator", "scanningFleet": "Scanning fleet…", "searchServers": "Search servers…", diff --git a/frontend/src/pages/Incidents.jsx b/frontend/src/pages/Incidents.jsx index 02806416..27a57c07 100644 --- a/frontend/src/pages/Incidents.jsx +++ b/frontend/src/pages/Incidents.jsx @@ -288,9 +288,10 @@ export default function Incidents() { kind: 'alert', key: `fleet-${alert.id}`, alertId: alert.id, - title: `${metric} over limit on ${subject}`, + // Offline / service-check alerts carry their own message and no threshold. + title: alert.detail || `${metric} over limit on ${subject}`, subject, - detail: `${metric} ${formatValue(alert.value)} / ${alert.threshold}`, + detail: alert.detail || `${metric} ${formatValue(alert.value)} / ${alert.threshold}`, state: alert.status, tone: alertStatusKind(alert.status), impact: alert.severity, diff --git a/frontend/src/pages/Servers.jsx b/frontend/src/pages/Servers.jsx index ea743b98..99088d97 100644 --- a/frontend/src/pages/Servers.jsx +++ b/frontend/src/pages/Servers.jsx @@ -29,6 +29,9 @@ import { useTranslation } from 'react-i18next'; import { t } from '../i18n/t'; import { toastError } from '@/utils/errorMessage'; import { formatDate } from '@/utils/intl'; +import { + DEFAULT_LEVEL, PERMISSION_LEVELS, buildInstallCommands, levelKind, serverHealth, +} from '@/utils/agentPermissionLevel'; // Radix Select items cannot use '' — stands in for "no group". const NO_GROUP = '__none'; @@ -231,6 +234,38 @@ const SERVER_COLUMNS = [ return {status}; }, }, + { + key: 'level', + headerKey: 'app.servers.levelColumn', header: 'Level', + sortable: true, + type: 'enum', + // NULL is a legacy agent that predates levels, which acts as full. + value: (server) => server.permission_level_effective || 'full', + sortValue: (server) => server.permission_level_effective || 'full', + groupable: true, + render: (server) => { + const level = server.permission_level_effective || 'full'; + return ( + + {levelLabel(level)} + + ); + }, + }, + { + key: 'health', + headerKey: 'app.servers.health', header: 'Health', + sortable: false, + render: (server) => { + const health = serverHealth(server); + const detail = health.failing.length ? ` (${health.failing.join(', ')})` : ''; + return ( + + {healthLabel(health.code) + detail} + + ); + }, + }, meterColumn('cpu', 'CPU', 'cpu_percent'), meterColumn('memory', 'Memory', 'memory_percent'), meterColumn('disk', 'Disk', 'disk_percent'), @@ -766,12 +801,72 @@ const EXPIRY_OPTIONS = [ ]; const DEFAULT_EXPIRY = 7 * 24 * 60 * 60; +const SET_HINT = 'serverkit-agent permissions set '; + +const levelLabel = (level) => { + if (level === 'monitor') return t('app.servers.levelMonitor', 'Monitor'); + if (level === 'protect') return t('app.servers.levelProtect', 'Protect'); + return t('app.servers.levelFull', 'Full'); +}; + +const healthLabel = (code) => { + switch (code) { + case 'healthy': return t('app.servers.healthHealthy', 'Healthy'); + case 'degraded': return t('app.servers.healthDegraded', 'Degraded'); + case 'failing': return t('app.servers.healthFailing', 'Failing'); + case 'stale': return t('app.servers.healthStale', 'Stale'); + case 'offline': return t('app.servers.healthOffline', 'Offline'); + default: return t('app.servers.healthPending', 'Pending'); + } +}; + +const LevelPicker = ({ value, onChange }) => { + const { t } = useTranslation(); + const copy = { + monitor: { + can: t('app.servers.levelMonitorCan', 'Reports CPU, memory, disk and service health (web server, PHP-FPM, database) to this panel.'), + cannot: t('app.servers.levelMonitorCannot', 'Cannot run commands, open a terminal or change anything. The panel cannot send it any instructions.'), + }, + protect: { + can: t('app.servers.levelProtectCan', 'Everything in Monitor, plus firewall, fail2ban, CrowdSec and Cloudflare origin-lock actions.'), + cannot: t('app.servers.levelProtectCannot', 'Cannot touch Docker, files, packages, services, shell or updates.'), + }, + full: { + can: t('app.servers.levelFullCan', 'Everything the agent supports: Docker, files, terminal, packages, services and more.'), + cannot: t('app.servers.levelFullCannot', 'No restrictions. Choose this only for servers you want this panel to fully manage.'), + }, + }; + return ( +
+ {t('app.servers.permissionLevel', 'Permission level')} +
+ {PERMISSION_LEVELS.map((level) => ( + + ))} +
+ + {t('app.servers.levelEnforcedByAgent', 'The level is enforced by the agent and can only be changed on the server itself, with')} + {' '}{SET_HINT} + +
+ ); +}; + const AddServerModal = ({ groups, onClose, onCreated }) => { const { t } = useTranslation(); const [mode, setMode] = useState('install'); const [step, setStep] = useState(1); const [groupId, setGroupId] = useState(''); const [expiresIn, setExpiresIn] = useState(DEFAULT_EXPIRY); + const [level, setLevel] = useState(DEFAULT_LEVEL); const [registrationData, setRegistrationData] = useState(null); const [loading, setLoading] = useState(false); const [error, setError] = useState(''); @@ -789,6 +884,7 @@ const AddServerModal = ({ groups, onClose, onCreated }) => { const result = await api.createServer({ expires_in: expiresIn, group_id: groupId || undefined, + requested_level: level, }); setRegistrationData(result); setStep(2); @@ -808,13 +904,15 @@ const AddServerModal = ({ groups, onClose, onCreated }) => { // the operator sees one line of curl noise, the shell says success, and // nothing was installed. The `&&` makes a failed fetch stop the command and // surface curl's non-zero exit (issue #101). - const linuxInstallScript = registrationData ? `curl -fsSL ${window.location.origin}/api/v1/servers/install.sh -o /tmp/serverkit-agent-install.sh && \\ - sudo bash /tmp/serverkit-agent-install.sh \\ - --server "${window.location.origin}" \\ - --token "${registrationData.registration_token}"` : ''; - - const windowsInstallScript = registrationData ? `irm ${window.location.origin}/api/v1/servers/install.ps1 | iex -Install-ServerKitAgent -Server "${window.location.origin}" -Token "${registrationData.registration_token}"` : ''; + const installCommands = registrationData + ? buildInstallCommands({ + origin: window.location.origin, + token: registrationData.registration_token, + level, + }) + : { linux: '', windows: '' }; + const linuxInstallScript = installCommands.linux; + const windowsInstallScript = installCommands.windows; // A right-side drawer, not a centred dialog: this flow is a multi-step // wizard with install scripts in it, and it always was a drawer — the @@ -887,6 +985,8 @@ Install-ServerKitAgent -Server "${window.location.origin}" -Token "${registratio {t('app.servers.generateASingleConnectionStringPaste', "Generate a single connection string. Paste it into the agent's pairing wizard, or use it with the one-liner installer. The agent's hostname becomes the server name on first connect; you can rename it later from the server's Settings tab.")}

+ +
diff --git a/frontend/src/styles/pages/_servers.scss b/frontend/src/styles/pages/_servers.scss index e880c251..f45ce5d1 100644 --- a/frontend/src/styles/pages/_servers.scss +++ b/frontend/src/styles/pages/_servers.scss @@ -2580,3 +2580,46 @@ flex-direction: column; gap: $space-3; } + +// Permission-level picker in the Add Server drawer +.level-picker { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: $space-2; + + &__opt { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: $space-1; + padding: $space-3; + text-align: start; + background: $bg-card; + border: 1px solid $border-subtle; + border-radius: $radius-control; + cursor: pointer; + transition: border-color $transition-fast, background $transition-fast; + + &:hover { + border-color: $border-active; + } + + &.is-active { + border-color: var(--accent-dim); + background: var(--accent-bg); + } + } + + &__head { + font-size: $text-xs; + font-weight: $font-weight-semibold; + color: $text-primary; + } + + &__desc { + font-size: $text-xs; + color: $text-tertiary; + line-height: 1.45; + white-space: normal; + } +} diff --git a/frontend/src/utils/__tests__/agentPermissionLevel.test.mjs b/frontend/src/utils/__tests__/agentPermissionLevel.test.mjs new file mode 100644 index 00000000..68e5d4f9 --- /dev/null +++ b/frontend/src/utils/__tests__/agentPermissionLevel.test.mjs @@ -0,0 +1,28 @@ +import assert from 'node:assert/strict'; +import test from 'node:test'; +import { buildInstallCommands, normalizeLevel, serverHealth } from '../agentPermissionLevel.js'; + +const NOW = Date.parse('2026-01-01T12:00:00Z'); +const ago = (s) => new Date(NOW - s * 1000).toISOString(); + +test('install commands carry the level', () => { + const cmds = buildInstallCommands({ origin: 'https://p.example', token: 'T', level: 'protect' }); + assert.match(cmds.linux, /--level protect$/); + assert.match(cmds.windows, /-Level protect$/); +}); + +test('unknown level falls back to monitor', () => { + assert.equal(normalizeLevel('root'), null); + const cmds = buildInstallCommands({ origin: 'o', token: 'T', level: 'root' }); + assert.match(cmds.linux, /--level monitor$/); +}); + +test('health combines status, report age and checks', () => { + const base = { status: 'online', last_report_at: ago(30), report_interval_seconds: 60 }; + assert.equal(serverHealth(base, NOW).code, 'healthy'); + assert.equal(serverHealth({ ...base, service_checks: [{ name: 'mysql', status: 'down' }] }, NOW).code, 'failing'); + assert.equal(serverHealth({ ...base, service_checks: [{ name: 'php', status: 'degraded' }] }, NOW).kind, 'amber'); + assert.equal(serverHealth({ ...base, last_report_at: ago(600) }, NOW).code, 'stale'); + assert.equal(serverHealth({ ...base, status: 'offline' }, NOW).kind, 'red'); + assert.equal(serverHealth({ status: 'pending' }, NOW).code, 'pending'); +}); diff --git a/frontend/src/utils/agentPermissionLevel.js b/frontend/src/utils/agentPermissionLevel.js new file mode 100644 index 00000000..056fbf6c --- /dev/null +++ b/frontend/src/utils/agentPermissionLevel.js @@ -0,0 +1,53 @@ +// Agent permission levels: install-command builder and server health summary. +// The level is enforced by the agent and only reported to the panel; nothing +// here (or anywhere in the UI) changes it. + +export const PERMISSION_LEVELS = ['monitor', 'protect', 'full']; +export const DEFAULT_LEVEL = 'monitor'; + +const MIN_SILENCE_MS = 3 * 60 * 1000; + +export function normalizeLevel(level) { + return PERMISSION_LEVELS.includes(level) ? level : null; +} + +export function levelKind(level) { + if (level === 'monitor') return 'cyan'; + if (level === 'protect') return 'violet'; + return 'amber'; +} + +export function buildInstallCommands({ origin, token, level }) { + const lvl = normalizeLevel(level) || DEFAULT_LEVEL; + return { + linux: `curl -fsSL ${origin}/api/v1/servers/install.sh -o /tmp/serverkit-agent-install.sh && \\ + sudo bash /tmp/serverkit-agent-install.sh \\ + --server "${origin}" \\ + --token "${token}" \\ + --level ${lvl}`, + windows: `irm ${origin}/api/v1/servers/install.ps1 | iex +Install-ServerKitAgent -Server "${origin}" -Token "${token}" -Level ${lvl}`, + }; +} + +// Health = online/offline + report age + failing service checks. +// -> { kind: Pill kind, code, failing: [check names], degraded: [check names] } +export function serverHealth(server, now = Date.now()) { + const status = server.status || 'pending'; + if (status === 'pending' || status === 'connecting') { + return { kind: 'gray', code: 'pending', failing: [], degraded: [] }; + } + const checks = server.service_checks || []; + const failing = checks.filter((c) => c.status === 'down').map((c) => c.name); + const degraded = checks.filter((c) => c.status === 'degraded').map((c) => c.name); + if (status !== 'online') return { kind: 'red', code: 'offline', failing, degraded }; + + const seen = server.last_report_at || server.last_seen; + const limit = Math.max(MIN_SILENCE_MS, 3 * 1000 * (server.report_interval_seconds || 0)); + if (seen && now - new Date(seen).getTime() > limit) { + return { kind: 'amber', code: 'stale', failing, degraded }; + } + if (failing.length) return { kind: 'red', code: 'failing', failing, degraded }; + if (degraded.length) return { kind: 'amber', code: 'degraded', failing, degraded }; + return { kind: 'green', code: 'healthy', failing, degraded }; +} From 0aab404e35d4bc2f86ed45887fff79c379195f98 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Tue, 3 Nov 2026 00:31:21 -0500 Subject: [PATCH 049/171] refactor(agents): raise typed errors from the report endpoint Keeps the hand-shaped error-body ratchet at its ceiling. Co-Authored-By: Claude Sonnet 5.5 --- backend/app/api/agent_report.py | 15 +++++++++------ backend/app/exceptions.py | 6 ++++++ docs/MIGRATION_INVENTORY.md | 4 ++-- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/backend/app/api/agent_report.py b/backend/app/api/agent_report.py index 870c74cd..958c2321 100644 --- a/backend/app/api/agent_report.py +++ b/backend/app/api/agent_report.py @@ -13,6 +13,9 @@ Auth (no JWT/CSRF; the HMAC is the credential): from flask import Blueprint, jsonify, request from app import limiter +from app.exceptions import ( + AuthenticationError, PayloadTooLargeError, PermissionDeniedError, ValidationError, +) from app.services import agent_health_service, permission_levels from app.utils.ip_utils import is_ip_allowed @@ -31,23 +34,23 @@ def _rate_key(): @limiter.limit("30 per minute", key_func=_rate_key) def report(): if (request.content_length or 0) > MAX_BODY_BYTES: - return jsonify({'error': 'payload too large'}), 413 + raise PayloadTooLargeError() raw = request.get_data(cache=True) if len(raw) > MAX_BODY_BYTES: - return jsonify({'error': 'payload too large'}), 413 + raise PayloadTooLargeError() server = agent_health_service.authenticate_report(raw, request.headers, MAX_SKEW_SECONDS) if not server: - return jsonify({'error': 'authentication failed'}), 401 + raise AuthenticationError('authentication failed') if server.allowed_ips and not is_ip_allowed(request.remote_addr, server.allowed_ips): - return jsonify({'error': 'IP not allowed'}), 403 + raise PermissionDeniedError('IP not allowed') body = request.get_json(silent=True) if not isinstance(body, dict): - return jsonify({'error': 'JSON object required'}), 400 + raise ValidationError('JSON object required') level = body.get('permission_level') if level not in permission_levels.LEVELS: - return jsonify({'error': 'permission_level must be monitor, protect or full'}), 400 + raise ValidationError('permission_level must be monitor, protect or full') interval = agent_health_service.ingest_report(server, level, body) return jsonify({'ok': True, 'interval_seconds': interval}) diff --git a/backend/app/exceptions.py b/backend/app/exceptions.py index 52f896b4..d0dcb47f 100644 --- a/backend/app/exceptions.py +++ b/backend/app/exceptions.py @@ -57,6 +57,12 @@ class PermissionDeniedError(ApplicationError, PermissionError): default_message = 'Access denied' +class PayloadTooLargeError(ApplicationError): + status_code = 413 + code = 'payload_too_large' + default_message = 'Payload too large' + + class NotFoundError(ApplicationError, LookupError): status_code = 404 code = 'not_found' diff --git a/docs/MIGRATION_INVENTORY.md b/docs/MIGRATION_INVENTORY.md index f8323690..a906a013 100644 --- a/docs/MIGRATION_INVENTORY.md +++ b/docs/MIGRATION_INVENTORY.md @@ -16,12 +16,12 @@ debt. Regenerate with `python scripts/generate-migration-inventory.py`. | Routes on bare @jwt_required() | auth_required() / role decorators | 598 | 598 | REGISTERED EXCEPTION: JWT-only is the deliberate default; conversion grants API-key access and happens per route, on decision | | HTTP statuses chosen by sniffing error text | typed errors from app.exceptions | 0 | 0 | INVARIANT at 0 - migration completed 2026-08-19 | | API crashes swallowed without recording | app.error_reporting | 0 | 0 | INVARIANT at 0 | -| Hand-shaped {'error': ...} bodies in app/api | typed errors + the global handler | 855 | 850 | migrate when touched; new endpoints raise | +| Hand-shaped {'error': ...} bodies in app/api | typed errors + the global handler | 849 | 850 | migrate when touched; new endpoints raise | | Raw subprocess calls outside the runners | app/utils/system.py runners | 23 | 23 | migrate when touched | | Controller-boundary violations (routes doing service work) | service layer extraction | 453 | 453 | migrate when touched (first-wave ratchet) | | raw api.* calls in pages/ | E1: useServerQuery/useServerMutation | 374 | 398 | migrate when touched | | per-page toast.error extractions in pages/ | E1: query-layer error presentation | 191 | 206 | migrate when touched | -| hand-rolled form-group blocks | F2: FormField/useForm | 314 | 321 | migrate when touched | +| hand-rolled form-group blocks | F2: FormField/useForm | 315 | 321 | migrate when touched | | unencoded ?k=${v} query interpolations in services/api | C4: buildQuery/encoding template | 0 | 0 | INVARIANT at 0 | | raw setInterval pollers | E2: usePolling/refetchInterval | 7 | 7 | DELIBERATE RESIDUE: clock ticks, socket-fallback hooks, and sibling-repo extension timers - each listed per file | | direct navigator.clipboard call sites | F3: copyToClipboard | 0 | 0 | INVARIANT at 0 | From 89cb31535329ea3d85fd835d217043b501c4477f Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Tue, 3 Nov 2026 00:32:48 -0500 Subject: [PATCH 050/171] chore(agents): re-vendor agent installers with --level support Synced from the agent repo's feat/agent-permission-levels branch; the drift check will pass once that branch is released. --- scripts/install.ps1 | 103 ++++++++++++++++++++++++++++++++++++++-- scripts/install.sh | 112 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 210 insertions(+), 5 deletions(-) mode change 100644 => 100755 scripts/install.sh diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 4f3e219b..645fc563 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -30,6 +30,17 @@ .PARAMETER Version Specific agent version to install (optional, defaults to latest) +.PARAMETER Level + Permission level: monitor (report-only, no inbound commands), protect + (security actions only) or full (everything). If omitted: a menu on an + interactive console, otherwise full with a warning. + +.PARAMETER Reconfigure + Required to change the level of an already-installed agent. + +.PARAMETER Yes + Skip the typed confirmation when reconfiguring. + .EXAMPLE .\install.ps1 -Token "sk_reg_xxx" -Server "https://your-serverkit.com" @@ -53,7 +64,15 @@ param( [string]$Name, [Parameter(Mandatory=$false)] - [string]$Version = "latest" + [string]$Version = "latest", + + [Parameter(Mandatory=$false)] + [ValidateSet("monitor", "protect", "full")] + [string]$Level, + + [switch]$Reconfigure, + + [switch]$Yes ) # Configuration @@ -172,11 +191,61 @@ function New-ConfigDirectory { } } +# Level recorded in an existing config ("" when none; no key = legacy = full). +function Get-InstalledLevel { + $cfg = Join-Path $ConfigDir "config.yaml" + if (-not (Test-Path $cfg)) { return "" } + $m = Select-String -Path $cfg -Pattern '^\s+level:\s*"?(\w+)"?' | Select-Object -First 1 + if ($m) { return $m.Matches[0].Groups[1].Value } + return "full" +} + +# Refuses to silently change an installed agent's level; returns the level to use. +function Resolve-Level { + param([string]$Level, [bool]$Reconfigure, [bool]$Yes) + + $current = Get-InstalledLevel + if ($current) { + if (-not $Level) { return $current } + if ($Level -eq $current) { return $Level } + if (-not $Reconfigure) { + Write-ColorOutput "This agent is already installed at level '$current'. Re-run with -Reconfigure to change it to '$Level'." "Error" + exit 1 + } + if (-not $Yes) { + $answer = Read-Host "Changing level $current -> $Level. Type '$Level' to confirm" + if ($answer -ne $Level) { + Write-ColorOutput "Confirmation did not match; permission level unchanged (use -Yes for scripted use)" "Error" + exit 1 + } + } + $script:ChangeLevelFrom = $current + return $Level + } + if ($Level) { return $Level } + if ([Environment]::UserInteractive -and -not [Console]::IsInputRedirected) { + Write-Host "" + Write-Host " Choose what this agent may do on this server:" + Write-Host " 1) monitor report-only, accepts no commands from the panel" + Write-Host " 2) protect security actions only (firewall, fail2ban, CrowdSec, origin lock)" + Write-Host " 3) full everything" + switch (Read-Host " Selection [1-3]") { + "1" { return "monitor" } + "2" { return "protect" } + "3" { return "full" } + default { Write-ColorOutput "Invalid selection" "Error"; exit 1 } + } + } + Write-ColorOutput "No -Level given and no console: defaulting to FULL control. Pass -Level monitor|protect|full to choose." "Warning" + return "full" +} + function Register-Agent { param( [string]$Token, [string]$Server, - [string]$Name + [string]$Name, + [string]$Level ) Write-ColorOutput "Registering agent with ServerKit..." "Info" @@ -188,6 +257,11 @@ function Register-Agent { if ($Name) { $arguments += @("--name", $Name) } + $arguments += @("--level", $Level) + + if ($script:ChangeLevelFrom) { + Start-Process -FilePath $agentPath -ArgumentList @("--config", $configPath, "permissions", "set", $Level, "--yes") -Wait -NoNewWindow | Out-Null + } try { $process = Start-Process -FilePath $agentPath -ArgumentList $arguments -Wait -PassThru -NoNewWindow @@ -307,7 +381,15 @@ function Install-ServerKitAgent { [string]$Name, [Parameter(Mandatory=$false)] - [string]$Version = "latest" + [string]$Version = "latest", + + [Parameter(Mandatory=$false)] + [ValidateSet("monitor", "protect", "full")] + [string]$Level, + + [switch]$Reconfigure, + + [switch]$Yes ) # Update script-level variables @@ -321,19 +403,30 @@ function Install-ServerKitAgent { exit 1 } + $Level = Resolve-Level -Level $Level -Reconfigure $Reconfigure.IsPresent -Yes $Yes.IsPresent + Get-LatestVersion Install-Agent New-ConfigDirectory - Register-Agent -Token $Token -Server $Server -Name $Name + Register-Agent -Token $Token -Server $Server -Name $Name -Level $Level Install-WindowsService Start-AgentService Add-ToPath Write-SuccessMessage + Write-Host "Permission level: $($Level.ToUpper())" -ForegroundColor Yellow + switch ($Level) { + "monitor" { Write-Host " Report-only: this agent sends metrics out and accepts NO commands." } + "protect" { Write-Host " Security actions only (firewall, fail2ban, CrowdSec, origin lock)." } + default { Write-Host " Full control: the panel can run any supported action." } + } + Write-Host " Change it (elevated prompt, this machine only):" + Write-Host " & '$InstallDir\$AgentBinary' permissions set " + Write-Host "" } # Direct execution with parameters if ($Token -and $Server) { - Install-ServerKitAgent -Token $Token -Server $Server -Name $Name -Version $Version + Install-ServerKitAgent -Token $Token -Server $Server -Name $Name -Version $Version -Level $Level -Reconfigure:$Reconfigure -Yes:$Yes } elseif ($PSBoundParameters.Count -gt 0) { Write-ColorOutput "Both -Token and -Server parameters are required" "Error" diff --git a/scripts/install.sh b/scripts/install.sh old mode 100644 new mode 100755 index 8eb38928..64347495 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -30,8 +30,16 @@ # --server, -s ServerKit server URL (required) # --name, -n Display name for this server (optional) # --version, -v Specific agent version to install (optional, defaults to latest) +# --level, -l Permission level: monitor | protect | full (see below) +# --reconfigure Allow changing the level of an already-installed agent +# --yes, -y Skip the typed confirmation when reconfiguring # --help, -h Show this help message # +# Permission levels: monitor = report-only (no inbound commands), protect = +# security actions only (firewall, fail2ban, CrowdSec, Cloudflare origin lock), +# full = everything. Omitted: a menu on a terminal; `full` (with a warning) +# when non-interactive, for compatibility with older install commands. +# set -e @@ -67,6 +75,9 @@ TOKEN="" SERVER_URL="" SERVER_NAME="" VERSION="latest" +LEVEL="" +RECONFIGURE=false +ASSUME_YES=false # Version injected by the panel when it serves this script (the panel already # resolves the latest agent release for its update endpoints). Empty means @@ -108,6 +119,9 @@ show_help() { echo " --server, -s ServerKit server URL (required)" echo " --name, -n Display name for this server (optional)" echo " --version, -v Specific agent version (optional, defaults to latest)" + echo " --level, -l Permission level: monitor | protect | full (optional)" + echo " --reconfigure Allow changing the level of an already-installed agent" + echo " --yes, -y Skip the typed confirmation when reconfiguring" echo " --help, -h Show this help message" echo "" echo "Example:" @@ -142,6 +156,19 @@ parse_args() { VERSION="$2" shift 2 ;; + --level|-l) + [[ $# -ge 2 ]] || log_error "Option $1 requires a value" + LEVEL="$(printf '%s' "$2" | tr '[:upper:]' '[:lower:]')" + shift 2 + ;; + --reconfigure) + RECONFIGURE=true + shift + ;; + --yes|-y) + ASSUME_YES=true + shift + ;; --help|-h) show_help ;; @@ -159,6 +186,72 @@ parse_args() { if [[ -z "$SERVER_URL" ]]; then log_error "Server URL is required. Use --server or -s" fi + + if [[ -n "$LEVEL" ]]; then + case "$LEVEL" in + monitor|protect|full) ;; + *) log_error "Unknown permission level '$LEVEL' (use monitor, protect or full)" ;; + esac + fi +} + +# Level recorded in an existing config ("" when none; a config without the +# key is a legacy install, which means full). +installed_level() { + local cfg="${CONFIG_DIR}/config.yaml" + [[ -f "$cfg" ]] || return 0 + local lvl + lvl="$(sed -n '/^permissions:/,/^[^ ]/ s/^[[:space:]]*level:[[:space:]]*//p' "$cfg" | head -n1 | tr -d "\"' \r")" + printf '%s' "${lvl:-full}" +} + +is_tty() { [[ -t 0 && -t 1 ]]; } + +# Refuse to silently change the level of an installed agent; --reconfigure +# plus a typed confirmation (or --yes) is required. +check_reconfigure() { + local current + current="$(installed_level)" + [[ -n "$current" ]] || return 0 + if [[ -z "$LEVEL" ]]; then + LEVEL="$current" + return 0 + fi + [[ "$LEVEL" != "$current" ]] || return 0 + if [[ "$RECONFIGURE" != true ]]; then + log_error "This agent is already installed at level '$current'. Re-run with --reconfigure to change it to '$LEVEL'." + fi + if [[ "$ASSUME_YES" != true ]]; then + local answer="" + if is_tty; then + read -r -p " Changing level ${current} -> ${LEVEL}. Type '${LEVEL}' to confirm: " answer + fi + [[ "$answer" == "$LEVEL" ]] || log_error "Confirmation did not match; permission level unchanged (use --yes for scripted use)" + fi + CHANGE_LEVEL_FROM="$current" +} + +# Pick a level when none was given: menu on a terminal, else full + warning. +resolve_level() { + [[ -z "$LEVEL" ]] || return 0 + if is_tty; then + echo "" + echo " Choose what this agent may do on this server:" + echo " 1) monitor report-only, accepts no commands from the panel" + echo " 2) protect security actions only (firewall, fail2ban, CrowdSec, origin lock)" + echo " 3) full everything (docker, files, terminal, packages, ...)" + local choice="" + read -r -p " Selection [1-3]: " choice + case "$choice" in + 1|monitor) LEVEL=monitor ;; + 2|protect) LEVEL=protect ;; + 3|full) LEVEL=full ;; + *) log_error "Invalid selection" ;; + esac + else + log_warn "No --level given and no terminal: defaulting to FULL control. Pass --level monitor|protect|full to choose." + LEVEL=full + fi } check_root() { @@ -351,6 +444,14 @@ register_agent() { if [[ -n "$SERVER_NAME" ]]; then REGISTER_CMD+=(--name "${SERVER_NAME}") fi + REGISTER_CMD+=(--level "${LEVEL}") + + # Re-installing at a different level: apply it locally first so the + # register step sees a consistent config. + if [[ -n "${CHANGE_LEVEL_FROM:-}" ]]; then + "${INSTALL_DIR}/${AGENT_BINARY}" --config "${CONFIG_DIR}/config.yaml" \ + permissions set "${LEVEL}" --yes >/dev/null 2>&1 || true + fi if ! "${REGISTER_CMD[@]}"; then log_error "Agent registration failed" @@ -448,6 +549,15 @@ print_success() { echo -e "${GREEN}║ Installation completed successfully! ║${NC}" echo -e "${GREEN}╚═══════════════════════════════════════════════════════════╝${NC}" echo "" + echo -e "${YELLOW}Permission level: ${LEVEL^^}${NC}" + case "$LEVEL" in + monitor) echo " Report-only: this agent sends metrics out and accepts NO commands." ;; + protect) echo " Security actions only (firewall, fail2ban, CrowdSec, origin lock)." ;; + *) echo " Full control: the panel can run any supported action." ;; + esac + echo " Change it (as root, on this machine only):" + echo " ${INSTALL_DIR}/${AGENT_BINARY} permissions set " + echo "" echo "Agent Status:" echo " Binary: ${INSTALL_DIR}/${AGENT_BINARY}" echo " Config: ${CONFIG_DIR}/config.yaml" @@ -466,6 +576,8 @@ main() { print_banner parse_args "$@" check_root + check_reconfigure + resolve_level detect_platform check_dependencies get_latest_version From be1968746f8e1810a116a993ff7bf8521bf04367 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Tue, 3 Nov 2026 00:59:48 -0500 Subject: [PATCH 051/171] feat(frontend): icon-first permission level picker with info tooltips Each level card now shows an illustration, title and allowed/blocked capability icons; the full explanation moved into an (i) tooltip. The enforced-by-agent note is a single compact line. Co-Authored-By: Claude Sonnet 5.5 --- .../components/servers/LevelIllustrations.jsx | 49 +++++++++ frontend/src/i18n/locales/en.json | 5 +- frontend/src/pages/Servers.jsx | 76 ++++++++++--- frontend/src/styles/pages/_servers.scss | 100 ++++++++++++++++-- .../__tests__/agentPermissionLevel.test.mjs | 12 ++- frontend/src/utils/agentPermissionLevel.js | 18 ++++ 6 files changed, 236 insertions(+), 24 deletions(-) create mode 100644 frontend/src/components/servers/LevelIllustrations.jsx diff --git a/frontend/src/components/servers/LevelIllustrations.jsx b/frontend/src/components/servers/LevelIllustrations.jsx new file mode 100644 index 00000000..bb8671d3 --- /dev/null +++ b/frontend/src/components/servers/LevelIllustrations.jsx @@ -0,0 +1,49 @@ +// Small inline illustrations for the permission-level cards. They use +// currentColor plus the panel accent variables, so they follow the theme. +const common = { + viewBox: '0 0 96 56', + height: 56, + 'aria-hidden': true, + focusable: 'false', + fill: 'none', + stroke: 'currentColor', + strokeWidth: 2, + strokeLinecap: 'round', + strokeLinejoin: 'round', +}; + +const Monitor = () => ( + + + + + +); + +const Protect = () => ( + + + + + +); + +const Full = () => ( + + + + + + + + +); + +const ILLUSTRATIONS = { monitor: Monitor, protect: Protect, full: Full }; + +const LevelIllustration = ({ level }) => { + const Svg = ILLUSTRATIONS[level] || Monitor; + return ; +}; + +export default LevelIllustration; diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index 02a7c335..a519601d 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -5670,6 +5670,8 @@ "agentFound": "Agent found", "agentPairedSuccessfully": "Agent paired", "autoDetectedFromAgentOptional": "Auto-detected from agent (optional)", + "capAllowed": "allowed", + "capBlocked": "blocked", "clearSelection": "Clear selection", "confirmThisFingerprintMatchesTheOne": "Confirm this fingerprint matches the one shown by the agent before continuing.", "connectionString": "Connection string", @@ -5704,10 +5706,11 @@ "lastSeen": "Last seen", "leaveBlankToUseTheAgent": "Leave blank to use the agent's hostname.", "levelColumn": "Level", - "levelEnforcedByAgent": "The level is enforced by the agent and can only be changed on the server itself, with", + "levelEnforcedShort": "Enforced on the server by the agent. Change with", "levelFull": "Full", "levelFullCan": "Everything the agent supports: Docker, files, terminal, packages, services and more.", "levelFullCannot": "No restrictions. Choose this only for servers you want this panel to fully manage.", + "levelInfo": "What can {{level}} do?", "levelMonitor": "Monitor", "levelMonitorCan": "Reports CPU, memory, disk and service health (web server, PHP-FPM, database) to this panel.", "levelMonitorCannot": "Cannot run commands, open a terminal or change anything. The panel cannot send it any instructions.", diff --git a/frontend/src/pages/Servers.jsx b/frontend/src/pages/Servers.jsx index 99088d97..485af69b 100644 --- a/frontend/src/pages/Servers.jsx +++ b/frontend/src/pages/Servers.jsx @@ -1,6 +1,8 @@ import { useState, useEffect, useCallback, useMemo, useId } from 'react'; import { useNavigate } from 'react-router-dom'; -import { ChevronRight, Folder, Plus, RefreshCw, Server as ServerLucideIcon, X } from 'lucide-react'; +import { Ban, ChevronRight, Container, Cpu, Database, Flame, Folder, HardDrive, Info, Lock, MemoryStick, Plus, RefreshCw, Server as ServerLucideIcon, Terminal, X } from 'lucide-react'; +import { Tooltip, TooltipTrigger, TooltipContent } from '@/components/ui/tooltip'; +import LevelIllustration from '../components/servers/LevelIllustrations'; import api from '../services/api'; import { useToast } from '../contexts/useToast.js'; import EmptyState from '../components/EmptyState'; @@ -30,7 +32,7 @@ import { t } from '../i18n/t'; import { toastError } from '@/utils/errorMessage'; import { formatDate } from '@/utils/intl'; import { - DEFAULT_LEVEL, PERMISSION_LEVELS, buildInstallCommands, levelKind, serverHealth, + DEFAULT_LEVEL, PERMISSION_LEVELS, buildInstallCommands, levelAllows, levelKind, serverHealth, } from '@/utils/agentPermissionLevel'; // Radix Select items cannot use '' — stands in for "no group". @@ -820,6 +822,19 @@ const healthLabel = (code) => { } }; +const CAPABILITY_ICONS = { + cpu: [Cpu, 'CPU'], + memory: [MemoryStick, 'Memory'], + disk: [HardDrive, 'Disk'], + services: [ServerLucideIcon, 'Web server and PHP'], + database: [Database, 'Database'], + firewall: [Flame, 'Firewall'], + ban: [Ban, 'Ban (fail2ban, CrowdSec)'], + terminal: [Terminal, 'Terminal'], + docker: [Container, 'Docker'], + files: [Folder, 'Files'], +}; + const LevelPicker = ({ value, onChange }) => { const { t } = useTranslation(); const copy = { @@ -836,24 +851,59 @@ const LevelPicker = ({ value, onChange }) => { cannot: t('app.servers.levelFullCannot', 'No restrictions. Choose this only for servers you want this panel to fully manage.'), }, }; + const onKeyDown = (e, level) => { + if (e.key === ' ' || e.key === 'Enter') { + e.preventDefault(); + onChange(level); + } + }; return (
{t('app.servers.permissionLevel', 'Permission level')}
{PERMISSION_LEVELS.map((level) => ( - +
+
onChange(level)} + onKeyDown={(e) => onKeyDown(e, level)} + > + + {levelLabel(level)} + + {Object.entries(CAPABILITY_ICONS).map(([cap, [Icon, label]]) => { + const allowed = levelAllows(level, cap); + const text = `${label}: ${allowed ? t('app.servers.capAllowed', 'allowed') : t('app.servers.capBlocked', 'blocked')}`; + return ( + + + ); + })} + +
+ + + + + + {copy[level].can} + {copy[level].cannot} + + +
))}
- - {t('app.servers.levelEnforcedByAgent', 'The level is enforced by the agent and can only be changed on the server itself, with')} + +
diff --git a/frontend/src/styles/pages/_servers.scss b/frontend/src/styles/pages/_servers.scss index f45ce5d1..86532642 100644 --- a/frontend/src/styles/pages/_servers.scss +++ b/frontend/src/styles/pages/_servers.scss @@ -2584,42 +2584,124 @@ // Permission-level picker in the Add Server drawer .level-picker { display: grid; - grid-template-columns: repeat(3, 1fr); + grid-template-columns: repeat(3, minmax(0, 1fr)); gap: $space-2; + @media (max-width: 560px) { + grid-template-columns: 1fr; + } + + // The (i) button is a sibling of the radio card, not nested in it. + &__cell { + position: relative; + display: flex; + } + &__opt { + flex: 1; display: flex; flex-direction: column; - align-items: flex-start; - gap: $space-1; + align-items: center; + gap: $space-2; padding: $space-3; - text-align: start; + text-align: center; + color: $text-tertiary; background: $bg-card; border: 1px solid $border-subtle; border-radius: $radius-control; cursor: pointer; - transition: border-color $transition-fast, background $transition-fast; + transition: border-color $transition-fast, background $transition-fast, box-shadow $transition-fast; &:hover { border-color: $border-active; + background: $bg-elevated; + } + + &:focus-visible { + outline: 2px solid var(--accent-dim); + outline-offset: 2px; } &.is-active { + color: var(--accent); border-color: var(--accent-dim); background: var(--accent-bg); } } + &__art svg { + display: block; + width: auto; + max-width: 100%; + height: 56px; + } + &__head { - font-size: $text-xs; + font-size: $text-sm; font-weight: $font-weight-semibold; color: $text-primary; } - &__desc { - font-size: $text-xs; + &__caps { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: $space-1; + } + + &__cap { + position: relative; + display: inline-flex; + color: $text-secondary; + + .is-active & { + color: var(--accent); + } + + &.is-blocked { + color: $text-tertiary; + opacity: .5; + + &::after { + content: ''; + position: absolute; + inset: 50% -2px auto; + height: 1.5px; + background: currentColor; + transform: rotate(-45deg); + } + } + } + + &__info { + position: absolute; + top: $space-1; + inset-inline-end: $space-1; + display: inline-flex; + padding: $space-1; color: $text-tertiary; - line-height: 1.45; + background: none; + border: 0; + border-radius: 50%; + cursor: pointer; + + &:hover, + &:focus-visible { + color: $text-primary; + } + } + + &__tip { + flex-direction: column; + align-items: flex-start; + max-width: 260px; white-space: normal; } + + &__note { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: $space-1; + } } diff --git a/frontend/src/utils/__tests__/agentPermissionLevel.test.mjs b/frontend/src/utils/__tests__/agentPermissionLevel.test.mjs index 68e5d4f9..5b5e7a3a 100644 --- a/frontend/src/utils/__tests__/agentPermissionLevel.test.mjs +++ b/frontend/src/utils/__tests__/agentPermissionLevel.test.mjs @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; import test from 'node:test'; -import { buildInstallCommands, normalizeLevel, serverHealth } from '../agentPermissionLevel.js'; +import { buildInstallCommands, CAPABILITIES, levelAllows, normalizeLevel, serverHealth } from '../agentPermissionLevel.js'; const NOW = Date.parse('2026-01-01T12:00:00Z'); const ago = (s) => new Date(NOW - s * 1000).toISOString(); @@ -26,3 +26,13 @@ test('health combines status, report age and checks', () => { assert.equal(serverHealth({ ...base, status: 'offline' }, NOW).kind, 'red'); assert.equal(serverHealth({ status: 'pending' }, NOW).code, 'pending'); }); + +test('capability matrix per level', () => { + const blocked = (level) => CAPABILITIES.filter((c) => !levelAllows(level, c)); + assert.deepEqual(blocked('monitor'), ['firewall', 'ban', 'terminal', 'docker', 'files']); + assert.deepEqual(blocked('protect'), ['terminal', 'docker', 'files']); + assert.deepEqual(blocked('full'), []); + assert.equal(levelAllows('protect', 'firewall'), true); + assert.equal(levelAllows('protect', 'ban'), true); + assert.equal(levelAllows('bogus', 'terminal'), false); +}); diff --git a/frontend/src/utils/agentPermissionLevel.js b/frontend/src/utils/agentPermissionLevel.js index 056fbf6c..4d914e82 100644 --- a/frontend/src/utils/agentPermissionLevel.js +++ b/frontend/src/utils/agentPermissionLevel.js @@ -51,3 +51,21 @@ export function serverHealth(server, now = Date.now()) { if (degraded.length) return { kind: 'amber', code: 'degraded', failing, degraded }; return { kind: 'green', code: 'healthy', failing, degraded }; } + +// What each level lets the panel do on a server. Mirrors +// backend/app/services/permission_levels.py: monitor is report-only, protect +// adds the PROTECT_ACTIONS (firewall, fail2ban/CrowdSec, Cloudflare origin +// lock), full is everything. +export const CAPABILITIES = ['cpu', 'memory', 'disk', 'services', 'database', 'firewall', 'ban', 'terminal', 'docker', 'files']; +const HEALTH = ['cpu', 'memory', 'disk', 'services', 'database']; +const PROTECT = [...HEALTH, 'firewall', 'ban']; + +export const LEVEL_CAPABILITIES = { + monitor: HEALTH, + protect: PROTECT, + full: CAPABILITIES, +}; + +export function levelAllows(level, capability) { + return (LEVEL_CAPABILITIES[normalizeLevel(level) || DEFAULT_LEVEL] || []).includes(capability); +} From bddca28881272d9764db52a593290ae8d067c6c1 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Tue, 3 Nov 2026 01:45:21 -0500 Subject: [PATCH 052/171] feat(frontend): less text, more icons - shared InfoTip, IconStepStrip and illustrations Move prose into tap-friendly (i) tips and replace intro paragraphs with icons, step strips and chips across settings, security, add-server, server detail, proxy, backups, downloads, imports, marketplace and templates. --- frontend/src/components/FormField.jsx | 19 +- frontend/src/components/IconStepStrip.jsx | 22 ++ frontend/src/components/InfoTip.jsx | 49 +++++ frontend/src/components/SectionIntro.jsx | 11 + .../components/backups/BackupsOverview.jsx | 10 +- frontend/src/components/ds/CatalogCard.jsx | 12 +- .../FileIntegrityIllustration.jsx | 8 + .../illustrations/LockShieldIllustration.jsx | 8 + .../src/components/proxy/ProxyLogoTiles.jsx | 22 ++ .../src/components/proxy/ProxyStackPanel.jsx | 11 +- .../src/components/security/IntegrityTab.jsx | 55 +++-- .../src/components/security/OverviewTab.jsx | 22 +- .../serverdetail/ServerSettingsTab.jsx | 22 +- .../src/components/servers/LinkPanelForm.jsx | 11 +- .../settings/AIConnectionsSettings.jsx | 15 +- .../settings/AIManagementSettings.jsx | 19 +- .../src/components/settings/AISettingsTab.jsx | 14 +- .../src/components/settings/AppearanceTab.jsx | 15 +- .../settings/SecuritySettingsTab.jsx | 17 +- .../components/settings/SiteSettingsTab.jsx | 59 ++---- .../src/components/settings/ThemeGallery.jsx | 10 +- frontend/src/i18n/locales/en.json | 31 ++- frontend/src/pages/Downloads.jsx | 14 +- frontend/src/pages/FleetProxy.jsx | 5 +- frontend/src/pages/ImportWizard.jsx | 49 +++-- frontend/src/pages/Servers.jsx | 26 +-- frontend/src/pages/Templates.jsx | 2 +- frontend/src/styles/components/_forms.scss | 10 + frontend/src/styles/components/_info-tip.scss | 192 ++++++++++++++++++ frontend/src/styles/main.scss | 1 + frontend/src/styles/pages/_import-wizard.scss | 17 +- frontend/src/styles/pages/_settings.scss | 5 + 32 files changed, 602 insertions(+), 181 deletions(-) create mode 100644 frontend/src/components/IconStepStrip.jsx create mode 100644 frontend/src/components/InfoTip.jsx create mode 100644 frontend/src/components/SectionIntro.jsx create mode 100644 frontend/src/components/illustrations/FileIntegrityIllustration.jsx create mode 100644 frontend/src/components/illustrations/LockShieldIllustration.jsx create mode 100644 frontend/src/components/proxy/ProxyLogoTiles.jsx create mode 100644 frontend/src/styles/components/_info-tip.scss diff --git a/frontend/src/components/FormField.jsx b/frontend/src/components/FormField.jsx index 4ec2a80a..b36cab57 100644 --- a/frontend/src/components/FormField.jsx +++ b/frontend/src/components/FormField.jsx @@ -2,6 +2,7 @@ import { useId, useMemo } from 'react'; import { Label } from '@/components/ui/label'; import { FieldContext } from '@/components/ui/field-context'; import { cn } from '@/lib/utils'; +import InfoTip from './InfoTip'; /** * Standard form field wrapper: label, hint, error message, and input slot. @@ -22,6 +23,7 @@ export function FormField({ children, error, hint, + info, required = false, className, labelClassName, @@ -42,12 +44,17 @@ export function FormField({ return (
- {label && ( - - )} + {label && (() => { + const labelEl = ( + + ); + return info + ?
{labelEl}{info}
+ : labelEl; + })()}
{children} diff --git a/frontend/src/components/IconStepStrip.jsx b/frontend/src/components/IconStepStrip.jsx new file mode 100644 index 00000000..b4c333ad --- /dev/null +++ b/frontend/src/components/IconStepStrip.jsx @@ -0,0 +1,22 @@ +import { Fragment } from 'react'; +import { ChevronRight } from 'lucide-react'; +import InfoTip from './InfoTip'; + +// 2-4 steps: icon tile, a short label and an optional (i) with the detail. +// steps = [{ icon: ReactNode, label: string, info?: ReactNode }] +export default function IconStepStrip({ steps, className = '' }) { + return ( +
    + {steps.map((s, i) => ( + + {i > 0 && } +
  1. + + {s.label} + {s.info && {s.info}} +
  2. +
    + ))} +
+ ); +} diff --git a/frontend/src/components/InfoTip.jsx b/frontend/src/components/InfoTip.jsx new file mode 100644 index 00000000..d88265ab --- /dev/null +++ b/frontend/src/components/InfoTip.jsx @@ -0,0 +1,49 @@ +import { useRef, useState } from 'react'; +import { Info } from 'lucide-react'; +import { Popover, PopoverTrigger, PopoverContent } from '@/components/ui/popover'; +import { t } from '../i18n/t'; + +// An (i) button that holds the explanation a page used to print inline. +// Mouse: hover/focus previews it. Touch, click, Enter and Space: toggles a +// pinned popover that closes on outside tap or Escape. The panel is portalled +// (no button-in-button) and above Modal/Sheet (.info-tip__panel z-index). +export default function InfoTip({ children, label, side = 'top', size = 'sm', className = '' }) { + const [open, setOpen] = useState(false); + const pinned = useRef(false); + const hoverable = (e) => e.pointerType === 'mouse'; + + const onOpenChange = (next) => { + pinned.current = next; + setOpen(next); + }; + const stop = (e) => e.stopPropagation(); + + return ( + + + {/* eslint-disable-next-line no-restricted-syntax -- bare 18px glyph button; Button/IconButton add control-sized chrome and a nested Tip */} + + + e.preventDefault()} + onCloseAutoFocus={(e) => e.preventDefault()} + onClick={stop} + > + {children} + + + ); +} diff --git a/frontend/src/components/SectionIntro.jsx b/frontend/src/components/SectionIntro.jsx new file mode 100644 index 00000000..d4d75041 --- /dev/null +++ b/frontend/src/components/SectionIntro.jsx @@ -0,0 +1,11 @@ +import InfoTip from './InfoTip'; + +// One short line with the longer explanation tucked in an (i). +export default function SectionIntro({ children, info, className = '' }) { + return ( +

+ {children} + {info && {info}} +

+ ); +} diff --git a/frontend/src/components/backups/BackupsOverview.jsx b/frontend/src/components/backups/BackupsOverview.jsx index 90a282ff..4a24e119 100644 --- a/frontend/src/components/backups/BackupsOverview.jsx +++ b/frontend/src/components/backups/BackupsOverview.jsx @@ -9,6 +9,7 @@ import api from '../../services/api'; import { formatBytes } from '@/utils/formatBytes'; import { KpiBand, MetricCard, Pill, DataTable, DataTableFooter } from '@/components/ds'; import EmptyState from '../EmptyState'; +import InfoTip from '../InfoTip'; import { useTranslation } from 'react-i18next'; import { formatDuration, formatNumber } from '@/utils/intl'; @@ -407,9 +408,12 @@ export default function BackupsOverview({
))} {destinations.count === 1 && ( -

- - {t('app.backupsOverview.everythingIsOnOneDiskAdd', 'Everything is on one disk. Add a remote destination so a dead server doesn\'t take the backups with it.')} +

+ + + {t('app.backupsOverview.everythingIsOnOneDiskAdd', 'Everything is on one disk. Add a remote destination so a dead server doesn\'t take the backups with it.')}

)} diff --git a/frontend/src/components/ds/CatalogCard.jsx b/frontend/src/components/ds/CatalogCard.jsx index af4bc3fe..606d752c 100644 --- a/frontend/src/components/ds/CatalogCard.jsx +++ b/frontend/src/components/ds/CatalogCard.jsx @@ -2,6 +2,7 @@ import { Star } from 'lucide-react'; import { cn } from '@/lib/utils'; import { Button } from '@/components/ui/button'; import { t } from '@/i18n/t'; +import InfoTip from '@/components/InfoTip'; /** * The one card for things you browse to install or deploy: extensions, @@ -21,6 +22,9 @@ import { t } from '@/i18n/t'; * /> * * + * `description` lives in an (i) beside the tag, not as a paragraph; `chips` + * (short strings) show as a tag row in its place. + * * One tag, one action. Version, author and counts go in `sub` / `facts` as * plain text rather than as more badges. * @@ -35,6 +39,7 @@ export function CatalogCard({ sub, tag, description, + chips, facts, action, featured = false, @@ -78,8 +83,13 @@ export function CatalogCard({ {sub && {sub}} {tag && {tag}} + {description && {description}}
- {description &&

{description}

} + {chips?.length > 0 && ( +
+ {chips.map((c) => {c})} +
+ )} {(facts || action) && (
{facts} diff --git a/frontend/src/components/illustrations/FileIntegrityIllustration.jsx b/frontend/src/components/illustrations/FileIntegrityIllustration.jsx new file mode 100644 index 00000000..8a98d5fe --- /dev/null +++ b/frontend/src/components/illustrations/FileIntegrityIllustration.jsx @@ -0,0 +1,8 @@ +// Decorative; the surrounding text carries the meaning. +export default function FileIntegrityIllustration() { + return ( + + ); +} diff --git a/frontend/src/components/illustrations/LockShieldIllustration.jsx b/frontend/src/components/illustrations/LockShieldIllustration.jsx new file mode 100644 index 00000000..c6b47b0e --- /dev/null +++ b/frontend/src/components/illustrations/LockShieldIllustration.jsx @@ -0,0 +1,8 @@ +// Decorative; the surrounding text carries the meaning. +export default function LockShieldIllustration() { + return ( + + ); +} diff --git a/frontend/src/components/proxy/ProxyLogoTiles.jsx b/frontend/src/components/proxy/ProxyLogoTiles.jsx new file mode 100644 index 00000000..6bc54071 --- /dev/null +++ b/frontend/src/components/proxy/ProxyLogoTiles.jsx @@ -0,0 +1,22 @@ +import { SiNginx, SiTraefikproxy, SiCaddy } from 'react-icons/si'; +import { t } from '../../i18n/t'; + +// The three proxy choices as logo tiles with a one-line caption each. +export default function ProxyLogoTiles() { + const items = [ + { Icon: SiNginx, name: 'Nginx', sub: t('app.proxyLogoTiles.hostDefault', 'Host default') }, + { Icon: SiTraefikproxy, name: 'Traefik', sub: t('app.proxyLogoTiles.dockerStack', 'Docker stack') }, + { Icon: SiCaddy, name: 'Caddy', sub: t('app.proxyLogoTiles.dockerStack', 'Docker stack') }, + ]; + return ( +
    + {items.map(({ Icon, name, sub }) => ( +
  • + + {name} + {sub} +
  • + ))} +
+ ); +} diff --git a/frontend/src/components/proxy/ProxyStackPanel.jsx b/frontend/src/components/proxy/ProxyStackPanel.jsx index b3e5ead0..65fd1d2a 100644 --- a/frontend/src/components/proxy/ProxyStackPanel.jsx +++ b/frontend/src/components/proxy/ProxyStackPanel.jsx @@ -6,6 +6,8 @@ import { Button } from '@/components/ui/button'; import { Textarea } from '@/components/ui/textarea'; import { Pill, SegControl, serviceStatusKind } from '../ds'; import EmptyState from '../EmptyState'; +import InfoTip from '../InfoTip'; +import ProxyLogoTiles from './ProxyLogoTiles'; import { AlertTriangle, CheckCircle2, Network } from 'lucide-react'; import { useTranslation } from 'react-i18next'; import { toastError } from '@/utils/errorMessage'; @@ -199,9 +201,10 @@ const ProxyStackPanel = ({ serverId }) => {
-

- {t('app.proxyStackPanel.hostNginxIsTheDefaultAnd', 'Host Nginx is the default and is recommended for PHP/WordPress. You can opt into a Dockerized Traefik or Caddy proxy deployed as a Compose stack.')} -

+
+ + {t('app.proxyStackPanel.hostNginxIsTheDefaultAnd', 'Host Nginx is the default and is recommended for PHP/WordPress. You can opt into a Dockerized Traefik or Caddy proxy deployed as a Compose stack.')} +
{audit && audit.mismatch_count > 0 && (
@@ -301,7 +304,7 @@ const ProxyStackPanel = ({ serverId }) => { {t('app.proxyStackPanel.theHostSNginxIsHandling', 'The host\'s Nginx is handling reverse proxying. Switch to Traefik or Caddy above to run a managed Docker proxy stack instead.')}} /> )}
diff --git a/frontend/src/components/security/IntegrityTab.jsx b/frontend/src/components/security/IntegrityTab.jsx index 75de07b1..e8b3a9c2 100644 --- a/frontend/src/components/security/IntegrityTab.jsx +++ b/frontend/src/components/security/IntegrityTab.jsx @@ -11,6 +11,11 @@ import { import { useTableSort } from '@/hooks/useTableSort'; import { useColumnVisibility } from '@/hooks/useColumnVisibility'; import { useTranslation } from 'react-i18next'; +import { Camera, Eye, GitCompare, ShieldOff } from 'lucide-react'; +import InfoTip from '@/components/InfoTip'; +import IconStepStrip from '@/components/IconStepStrip'; +import SectionIntro from '@/components/SectionIntro'; +import FileIntegrityIllustration from '@/components/illustrations/FileIntegrityIllustration'; import { Card as SharedCard, CardHeader as SharedCardHeader, CardContent as SharedCardContent } from '@/components/ui/card'; // Scoped file-integrity monitoring: baseline-and-diff over the paths @@ -309,17 +314,26 @@ const IntegrityTab = () => { : clean)} -

- {baseline - ? t('app.integrityTab.baselineSummary', { + {baseline ? ( +

+ {t('app.integrityTab.baselineSummary', { count: baseline.file_count, age: formatAge(baseline.created_at) || t('app.integrityTab.unknownAge', 'unknown age'), defaultValue_one: 'Baseline: 1 file, {{age}}', defaultValue_other: 'Baseline: {{count}} files, {{age}}', - }) - : t('app.integrityTab.noBaselineYet', 'No baseline yet. Create one to start tracking changes.')} - {check && ` · ${t('app.integrityTab.lastCheck', 'Last check {{age}}', { age: formatAge(check.checked_at) || '' })}`} -

+ })} + {check && ` · ${t('app.integrityTab.lastCheck', 'Last check {{age}}', { age: formatAge(check.checked_at) || '' })}`} +

+ ) : ( +

+ + + {t('app.integrityTab.noBaselineYet', 'No baseline yet. Create one to start tracking changes.')} + {check && ` · ${t('app.integrityTab.lastCheck', 'Last check {{age}}', { age: formatAge(check.checked_at) || '' })}`} +

+ )} {/* These act on the SCOPE and are there whether or not the changes list is open, so they keep their own bar; the table's chrome rides the view line below. */} @@ -427,21 +441,34 @@ const IntegrityTab = () => {
)} -

- {t('app.integrityTab.baselineAndDiffMonitoringOverThe', 'Baseline-and-diff monitoring over the paths ServerKit manages. Baseline a scope, then check it (or let the scheduled sweep do it). Any added, removed or modified files are flagged and admins are notified. Accepting changes re-baselines the scope.')} -

+
+ +
+ + {t('app.integrityTab.headerLine', 'Detect changed config files.')} + + , label: t('app.integrityTab.stepBaseline', 'Baseline'), info: t('app.integrityTab.stepBaselineInfo', 'Snapshot the current files of a scope.') }, + { icon: , label: t('app.integrityTab.stepWatch', 'Watch'), info: t('app.integrityTab.stepWatchInfo', 'Check manually or let the scheduled sweep run.') }, + { icon: , label: t('app.integrityTab.stepDiff', 'Diff'), info: t('app.integrityTab.stepDiffInfo', 'Added, removed or modified files are flagged and admins are notified. Accepting re-baselines.') }, + ]} + /> +
+
{managedScopes.map(renderScopeCard)} {appScopes.map(renderScopeCard)} -

{t('app.integrityTab.applicationDocroots', 'Service docroots')} {t('app.integrityTab.optIn', '· opt-in')}

+

{t('app.integrityTab.applicationDocroots', 'Service docroots')} {t('app.integrityTab.optIn', '· opt-in')}{' '} + {t('app.integrityTab.watchingADocrootHashesEveryFile', 'Watching a docroot hashes every file outside upload/cache directories, so it is opt-in per service.')} +

-

- {t('app.integrityTab.watchingADocrootHashesEveryFile', 'Watching a docroot hashes every file outside upload/cache directories, so it is opt-in per service.')} -

{appsError ? ( ) : apps.length === 0 ? ( diff --git a/frontend/src/components/security/OverviewTab.jsx b/frontend/src/components/security/OverviewTab.jsx index ea30c7ff..9c413c8d 100644 --- a/frontend/src/components/security/OverviewTab.jsx +++ b/frontend/src/components/security/OverviewTab.jsx @@ -15,7 +15,10 @@ import { Siren, Bug, Radar, + Puzzle, + Bell, } from 'lucide-react'; +import InfoTip from '@/components/InfoTip'; import { Card as SharedCard, CardHeader as SharedCardHeader, CardContent as SharedCardContent } from '@/components/ui/card'; // Status glyph per check state — paired with the label so state never relies on @@ -196,17 +199,22 @@ const OverviewTab = ({ status, onRefresh, onNavigateTab }) => { })}
-

+

{!hasSecurityExtensions && ( <> - {t('app.overviewTab.moreSecurityTools', 'More security tools (malware scanning, brute-force protection, vulnerability scans, auto-updates) are available as extensions in the')} - {' '} - {t('app.overviewTab.marketplaceLink', 'Extensions')} - {'. '} + +
diff --git a/frontend/src/components/serverdetail/ServerSettingsTab.jsx b/frontend/src/components/serverdetail/ServerSettingsTab.jsx index 8627202c..d36fcce8 100644 --- a/frontend/src/components/serverdetail/ServerSettingsTab.jsx +++ b/frontend/src/components/serverdetail/ServerSettingsTab.jsx @@ -5,6 +5,7 @@ import { useToast } from '../../contexts/useToast.js'; import { useConfirm } from '../../hooks/useConfirm'; import CopyField from '@/components/CopyField'; import { InfoList, InfoItem } from '../InfoList'; +import InfoTip from '../InfoTip'; import { DangerZone } from '../DangerZone'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; @@ -45,12 +46,13 @@ const AgentRegistrationSection = ({ server, onRegenerateToken }) => {
-

{t('app.serverSettingsTab.connectionString', 'Connection string')}

-

+

{t('app.serverSettingsTab.connectionString', 'Connection string')} + {t('app.serverSettingsTab.generateAFreshConnectionStringTo', 'Generate a fresh connection string to pair (or re-pair) this server. Useful after reinstalling the agent: old credentials are gone, but a new string brings the agent right back to this row.')} {isOnline && ` ${t('app.serverSettingsTab.onlineRegenerateNote', 'This server is online now; a new string only affects re-pairing.')}`} {isExpired && ` ${t('app.serverSettingsTab.previousTokenExpired', 'The previous token has expired.')}`} -

+

+

{t('app.serverSettingsTab.pairOrRepair', 'Pair or re-pair this server.')}

{preview &&
{connections.find((item) => item.id === preview.connection_id)?.name} · {preview.model}

{preview.reason}

} {toggle('fallback_enabled', t('ai.management.enableFallback', 'Enable fallback before output starts'))} -

{t('ai.management.fallbackHint', 'Candidates are tried in order using their own saved credentials. Delivered output and tool actions are never replayed. Degradation chooses a lower-priced candidate before a turn at 80% of the conversation allowance; unknown prices cannot be compared.')}

+ {t('ai.management.fallbackHint', 'Candidates are tried in order using their own saved credentials. Delivered output and tool actions are never replayed. Degradation chooses a lower-priced candidate before a turn at 80% of the conversation allowance; unknown prices cannot be compared.')} {candidates('fallbacks')}
@@ -132,10 +131,10 @@ export default function AIManagementSettings({ connections, defaultId }) { {numberField('max_tool_rounds', t('ai.management.toolRounds', 'Maximum tool rounds'), 1, 20)} {numberField('max_tool_result_length', t('ai.management.toolLength', 'Maximum tool result characters'), 256, 32000)} {numberField('max_history_messages', t('ai.management.history', 'Messages kept in model context'), 4, 200)} - + change('temperature', e.target.value === '' ? null : e.target.value)} /> - + setSettings((s) => ({ ...s, max_cost_usd: e.target.value }))} /> -

{t('ai.settings.costHint', 'Used by the budget behavior in Task models and behavior. A call can exceed the remaining amount; models with unknown pricing need a provider-side limit. Set 0 for no limit.')}

diff --git a/frontend/src/components/settings/AppearanceTab.jsx b/frontend/src/components/settings/AppearanceTab.jsx index 721fa0f8..e9d4923a 100644 --- a/frontend/src/components/settings/AppearanceTab.jsx +++ b/frontend/src/components/settings/AppearanceTab.jsx @@ -13,6 +13,7 @@ import ThemeBrowseModal from './ThemeBrowseModal'; import ThemeStudioModal from './ThemeStudioModal'; import api from '../../services/api'; import { useTranslation } from 'react-i18next'; +import InfoTip from '../InfoTip'; import { toastError } from '@/utils/errorMessage'; const ACCENT_PRESETS = [ @@ -64,8 +65,7 @@ const AppearanceTab = () => {
-

{t('app.appearanceTab.theme', 'Theme')}

-

{t('app.appearanceTab.selectYourPreferredColorScheme', 'Select your preferred color scheme')}

+

{t('app.appearanceTab.theme', 'Theme')} {t('app.appearanceTab.selectYourPreferredColorScheme', 'Select your preferred color scheme')}

-

{t('app.appearanceTab.accentColor', 'Accent color')}

-

{t('app.appearanceTab.chooseThePrimaryAccentColorUsed', 'Choose the primary accent color used across the interface.')}

+

{t('app.appearanceTab.accentColor', 'Accent color')} {t('app.appearanceTab.chooseThePrimaryAccentColorUsed', 'Choose the primary accent color used across the interface.')}

{ACCENT_PRESETS.map(({ label, color }) => (
-

{t('app.appearanceTab.dashboardWidgets', 'Dashboard widgets')}

-

- {t('app.appearanceTab.widgetsAreArrangedOnTheDashboard', 'Widgets are arranged on the dashboard itself now. Add, move, resize and configure them in place, across as many boards as you need.')} -

+

{t('app.appearanceTab.dashboardWidgets', 'Dashboard widgets')} {t('app.appearanceTab.widgetsAreArrangedOnTheDashboard', 'Widgets are arranged on the dashboard itself now. Add, move, resize and configure them in place, across as many boards as you need.')}

- - {t('app.siteSettingsTab.newAppsGetTheFirstFree', 'New services get the first free port at or above this number. Set to')} 0 {t('app.siteSettingsTab.toUseEachTemplateSOwn', 'to use each template\'s own default (WordPress starts at 8300). Ports already in use are always skipped, so collisions can\'t happen.')} -
-

{t('app.siteSettingsTab.managedSitesBaseDomains', 'Managed services: base domains')}

-

{t('app.siteSettingsTab.publishManagedSitesAt', 'Publish managed services at')} <name>.<base-domain>. {t('app.siteSettingsTab.registerBaseDomains', 'Register one or more base domains; a new service can be created under any of them, defaulting to the one marked')} {t('common.labels.default', 'Default')}. {t('app.siteSettingsTab.pointAWildcardRecord', 'Point a wildcard record')} *.<base> {t('app.siteSettingsTab.orPerSiteARecordsAt', '(or per-service A records) at this server.')}

+

{t('app.siteSettingsTab.managedSitesBaseDomains', 'Managed services: base domains')} {t('app.siteSettingsTab.publishManagedSitesAt', 'Publish managed services at')} <name>.<base-domain>. {t('app.siteSettingsTab.registerBaseDomains', 'Register one or more base domains; a new service can be created under any of them, defaulting to the one marked')} {t('common.labels.default', 'Default')}. {t('app.siteSettingsTab.pointAWildcardRecord', 'Point a wildcard record')} *.<base> {t('app.siteSettingsTab.orPerSiteARecordsAt', '(or per-service A records) at this server.')}

{httpsError ? ( {
- + {t('app.siteSettingsTab.sharedByEveryBaseDomainUsed', 'Shared by every base domain. Used to auto-create their DNS A records.')}
{
- {t('app.siteSettingsTab.sharedByEveryBaseDomainUsed', 'Shared by every base domain. Used to auto-create their DNS A records.')}
{https.providers?.length > 0 ? (
-
+
{t('app.siteSettingsTab.usedToIssueEachBaseS', 'Used to issue each base\'s wildcard certificate (DNS-01). Each base can use a different connected provider.')}
- {t('app.siteSettingsTab.usedToIssueEachBaseS', 'Used to issue each base\'s wildcard certificate (DNS-01). Each base can use a different connected provider.')}
) : ( {t('app.siteSettingsTab.connectADnsProviderUnderEmail', 'Connect a DNS provider under Email → DNS providers to enable per-domain wildcard HTTPS.')} @@ -524,6 +510,10 @@ const SiteSettingsTab = ({ onDevModeChange }) => { )} + {t('app.siteSettingsTab.sitesPublishAt', 'Services publish at')} <name>.{b.domain || 'base-domain'}.{' '} + {(b.dns_mode || 'wildcard') === 'wildcard' + ? <>{t('app.siteSettingsTab.point', 'Point')} *.{b.domain || 'base-domain'} {t('app.siteSettingsTab.atThisServer', 'at this server.')} + : <>{t('app.siteSettingsTab.eachNewSiteGetsItsOwn', 'Each new service gets its own A record, auto-created via the provider.')}}
setCategory(cat)} > {cat === 'all' ? t('common.labels.all', 'All') : cat} @@ -214,7 +227,7 @@ export default function Recipes() { {(recipe.requirements?.cpuCores) && {recipe.requirements.cpuCores} vCPU} {(recipe.requirements?.memoryMB) - && {formatBytes(recipe.requirements.memoryMB * GB, { decimals: 0 })}} + && {formatBytes(recipe.requirements.memoryMB * MB, { decimals: 0 })}} {(recipe.requirements?.diskGB) && {formatBytes(recipe.requirements.diskGB * GB, { decimals: 0 })}} {(recipe.requirements?.igpu && recipe.requirements.igpu !== 'none') diff --git a/frontend/src/styles/pages/_recipes.scss b/frontend/src/styles/pages/_recipes.scss index b978a35f..5755acca 100644 --- a/frontend/src/styles/pages/_recipes.scss +++ b/frontend/src/styles/pages/_recipes.scss @@ -5,29 +5,25 @@ &__head { display: flex; - align-items: flex-end; - gap: $spacing-lg; + flex-direction: column; + gap: $spacing-md; margin-bottom: $spacing-md; } - &__lede { + &__intro { flex: 1; min-width: 0; - margin: 0; - color: var(--text-secondary); - font-size: $text-sm; - line-height: 1.55; - max-width: 640px; } &__search { display: flex; align-items: center; gap: $space-2; - width: 260px; + width: 100%; + max-width: 360px; height: $control-md; padding: 0 $space-3; - border: 1px solid var(--border-color); + border: 1px solid var(--border-default); border-radius: $radius-control; background: var(--bg-card); color: var(--text-tertiary); @@ -48,16 +44,27 @@ flex-wrap: wrap; gap: $space-2; margin-bottom: $spacing-md; + } - .sk-pill { - cursor: pointer; - opacity: 0.72; + &__cat { + display: inline-flex; + align-items: center; + min-height: $control-sm; + padding: 0 $space-3; + border: 1px solid var(--border-default); + border-radius: $radius-full; + background: var(--bg-card); + color: var(--text-secondary); + font-size: $text-sm; + font-weight: $font-weight-medium; + cursor: pointer; - &.is-active { - opacity: 1; - border-color: var(--primary-color); - color: var(--primary-color); - } + &:hover { color: var(--text-primary); } + + &.is-active { + border-color: var(--accent); + background: var(--accent-bg); + color: var(--accent); } } @@ -87,7 +94,7 @@ flex-direction: column; gap: $space-3; padding: $spacing-md; - border: 1px solid var(--border-color); + border: 1px solid var(--border-default); border-radius: $radius-card; background: var(--bg-card); @@ -105,8 +112,8 @@ height: 34px; // geometry: icon tile flex-shrink: 0; border-radius: $radius-control; - background: color-mix(in srgb, var(--primary-color) 12%, transparent); - color: var(--primary-color); + background: var(--accent-bg); + color: var(--accent); } &__id { @@ -152,7 +159,7 @@ span { padding: $space-hair $space-2; border-radius: $radius-badge; - border: 1px solid var(--border-color); + border: 1px solid var(--border-default); font-size: $text-xs; color: var(--text-tertiary); @@ -201,7 +208,7 @@ width: 100%; height: $control-md; padding: 0 $space-3; - border: 1px solid var(--border-color); + border: 1px solid var(--border-default); border-radius: $radius-control; background: var(--bg-input, var(--bg-card)); color: var(--text-primary); @@ -220,7 +227,7 @@ width: 100%; padding: $space-3 $space-3; border: none; - border-bottom: 1px solid var(--border-color); + border-bottom: 1px solid var(--border-default); background: transparent; color: var(--text-primary); cursor: pointer; @@ -231,9 +238,9 @@ &:hover { background: var(--bg-hover, rgba(128, 128, 128, 0.06)); } &.is-on { - background: color-mix(in srgb, var(--primary-color) 8%, transparent); + background: var(--accent-bg); - svg { color: var(--primary-color); } + svg { color: var(--accent); } } } @@ -242,11 +249,11 @@ height: 14px; flex-shrink: 0; border-radius: 50%; - border: 1.5px solid var(--border-color); + border: 1.5px solid var(--border-default); .is-on & { - border-color: var(--primary-color); - box-shadow: inset 0 0 0 3.5px var(--primary-color); // geometry: draws the radio's inner dot + border-color: var(--accent); + box-shadow: inset 0 0 0 3.5px var(--accent); // geometry: draws the radio's inner dot } } @@ -298,7 +305,7 @@ align-items: center; gap: $space-2; padding: $space-2 $space-3; - border-bottom: 1px solid var(--border-color); + border-bottom: 1px solid var(--border-default); font-size: $text-sm; &:last-child { border-bottom: none; } @@ -325,7 +332,7 @@ align-items: center; gap: $space-2; padding: $space-2 $space-3; - border-bottom: 1px solid var(--border-color); + border-bottom: 1px solid var(--border-default); font-size: $text-sm; &:last-child { border-bottom: none; } @@ -336,6 +343,6 @@ &__url { font-size: $text-xs; - color: var(--primary-color); + color: var(--accent); } } From 34bc7d081e9e10a2ee627302e5dcab1ec3a0e383 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Tue, 3 Nov 2026 13:04:09 -0500 Subject: [PATCH 063/171] fix(frontend): branch incident copy on alert type and drop null placeholders --- .../monitoring/__tests__/alertCopy.test.mjs | 39 ++++++++++++ .../src/components/monitoring/alertCopy.js | 62 +++++++++++++++++++ frontend/src/i18n/locales/en.json | 23 +++++++ frontend/src/pages/Incidents.jsx | 35 +++++------ 4 files changed, 140 insertions(+), 19 deletions(-) create mode 100644 frontend/src/components/monitoring/__tests__/alertCopy.test.mjs create mode 100644 frontend/src/components/monitoring/alertCopy.js diff --git a/frontend/src/components/monitoring/__tests__/alertCopy.test.mjs b/frontend/src/components/monitoring/__tests__/alertCopy.test.mjs new file mode 100644 index 00000000..dcb8bce6 --- /dev/null +++ b/frontend/src/components/monitoring/__tests__/alertCopy.test.mjs @@ -0,0 +1,39 @@ +import assert from 'node:assert/strict'; +import test from 'node:test'; + +import { classifyAlertMetric, describeAlert, formatReading } from '../alertCopy.js'; + +// Minimal i18next stand-in: default string + {{var}} interpolation. +const t = (_key, fallback, vars = {}) => fallback.replace(/{{(\w+)}}/g, (_, k) => vars[k]); +const text = (alert) => JSON.stringify(describeAlert(t, alert)); + +test('classifies health signals apart from threshold metrics', () => { + assert.deepEqual(classifyAlertMetric('offline'), { kind: 'offline' }); + assert.deepEqual(classifyAlertMetric('svc:mysql'), { kind: 'service', service: 'mysql' }); + assert.deepEqual(classifyAlertMetric('cpu'), { kind: 'threshold' }); +}); + +test('offline and service alerts never claim a limit or render placeholders', () => { + const offline = describeAlert(t, { metric: 'offline', value: null, threshold: null, subject: 'web-1' }); + assert.equal(offline.title, 'web-1 is offline'); + const service = describeAlert(t, { metric: 'svc:mysql', value: null, threshold: null, subject: 'web-1' }); + assert.equal(service.title, 'mysql is down on web-1'); + assert.equal(service.detail, 'mysql is not running'); + for (const s of [text({ metric: 'offline', subject: 'x' }), text({ metric: 'svc:a', subject: 'x' })]) { + assert.doesNotMatch(s, /null|undefined|—|over limit/); + } +}); + +test('threshold alerts include the reading when present and omit it when not', () => { + const full = describeAlert(t, { metric: 'cpu', value: 93.456, threshold: 90, subject: 'db' }); + assert.equal(full.title, 'CPU % over limit on db'); + assert.equal(full.detail, 'CPU % 93.5 of 90 limit'); + const bare = describeAlert(t, { metric: 'disk', value: null, threshold: null, subject: 'db' }); + assert.equal(bare.detail, 'Disk %'); + assert.doesNotMatch(text({ metric: 'memory', subject: 'db' }), /null|undefined|—/); +}); + +test('unknown or missing metric falls back to a neutral title', () => { + assert.equal(describeAlert(t, { metric: undefined, subject: 'db' }).title, 'Alert on db'); + assert.equal(formatReading('x'), null); +}); diff --git a/frontend/src/components/monitoring/alertCopy.js b/frontend/src/components/monitoring/alertCopy.js new file mode 100644 index 00000000..a7d95413 --- /dev/null +++ b/frontend/src/components/monitoring/alertCopy.js @@ -0,0 +1,62 @@ +import { METRIC_LABELS } from './fleetMetrics.js'; + +// Plain-language title/detail for a metric alert. The backend's `metric` is +// either a threshold metric (cpu, memory, disk, network_*) or a health signal +// with no reading at all: `offline` (server stopped reporting) and +// `svc:` (a watched service is down). Only the first kind has a value and +// limit, so only it may talk about going "over limit". +const SERVICE_PREFIX = 'svc:'; + +export function classifyAlertMetric(metric) { + if (metric === 'offline') return { kind: 'offline' }; + if (typeof metric === 'string' && metric.startsWith(SERVICE_PREFIX)) { + return { kind: 'service', service: metric.slice(SERVICE_PREFIX.length) || null }; + } + return { kind: 'threshold' }; +} + +export function formatReading(value, digits = 1) { + return typeof value === 'number' && Number.isFinite(value) ? value.toFixed(digits) : null; +} + +export function metricLabel(metric) { + return METRIC_LABELS[metric] || metric || null; +} + +// `t` is i18next's translate function (injected so this stays testable). +export function describeAlert(t, { metric, value, threshold, subject }) { + const { kind, service } = classifyAlertMetric(metric); + if (kind === 'offline') { + return { + title: t('app.alertCopy.offlineTitle', '{{subject}} is offline', { subject }), + detail: t('app.alertCopy.offlineDetail', 'Stopped reporting'), + }; + } + if (kind === 'service') { + return service + ? { + title: t('app.alertCopy.serviceDownTitle', '{{service}} is down on {{subject}}', { service, subject }), + detail: t('app.alertCopy.serviceDownDetail', '{{service}} is not running', { service }), + } + : { + title: t('app.alertCopy.serviceDownAnyTitle', 'A service is down on {{subject}}', { subject }), + detail: t('app.alertCopy.serviceDownAnyDetail', 'Service not running'), + }; + } + const label = metricLabel(metric); + const reading = formatReading(value); + const limit = formatReading(threshold, 0); + if (!label) { + return { title: t('app.alertCopy.genericTitle', 'Alert on {{subject}}', { subject }), detail: '' }; + } + let detail = label; + if (reading && limit) { + detail = t('app.alertCopy.readingOfLimit', '{{metric}} {{reading}} of {{limit}} limit', { metric: label, reading, limit }); + } else if (reading) { + detail = t('app.alertCopy.readingOnly', '{{metric}} {{reading}}', { metric: label, reading }); + } + return { + title: t('app.alertCopy.overLimitTitle', '{{metric}} over limit on {{subject}}', { metric: label, subject }), + detail, + }; +} diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index e369fe45..df297b82 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -361,6 +361,18 @@ "decisionFailed": "Couldn't submit your decision.", "requestFailed": "Couldn't reach the assistant." }, + "alertCopy": { + "genericTitle": "Alert on {{subject}}", + "offlineDetail": "Stopped reporting", + "offlineTitle": "{{subject}} is offline", + "overLimitTitle": "{{metric}} over limit on {{subject}}", + "readingOfLimit": "{{metric}} {{reading}} of {{limit}} limit", + "readingOnly": "{{metric}} {{reading}}", + "serviceDownAnyDetail": "Service not running", + "serviceDownAnyTitle": "A service is down on {{subject}}", + "serviceDownDetail": "{{service}} is not running", + "serviceDownTitle": "{{service}} is down on {{subject}}" + }, "alertsTab": { "acknowledged": "Acknowledged", "allClear": "All clear", @@ -3316,7 +3328,9 @@ "rules": "Rules", "searchIncidentsAndAlerts": "Search incidents and alerts…", "subject": "Subject", + "thisServer": "This server", "timeline": "Timeline", + "unknownServer": "Unknown server", "whatChanged": "What changed?", "whatHappened": "What happened" }, @@ -4804,6 +4818,7 @@ "cpu": "CPU", "disk": "Disk", "featured": "Featured", + "headerLine": "One-click installers", "install": "Install", "lede": "Ready-to-go installers that run as real operations: probe, derive, apply, verify. Secrets are asked for mid-run and kept in the vault.", "loadFailed": "Couldn't load the recipe catalog.", @@ -4822,6 +4837,14 @@ "secretAsks_other": "{{count}} secret asks", "startFailed": "Couldn't start the recipe.", "started": "Recipe started on {{server}}", + "stepApply": "Apply", + "stepApplyInfo": "Derive settings and run the install as a real operation.", + "stepProbe": "Probe", + "stepProbeInfo": "Check the target server meets the requirements.", + "stepSecrets": "Secrets", + "stepSecretsInfo": "Secrets are asked for mid-run and kept in the vault.", + "stepVerify": "Verify", + "stepVerifyInfo": "Confirm the service came up healthy.", "stepsCount_one": "1 step", "stepsCount_other": "{{count}} steps", "unavailable": "Recipe catalog unavailable", diff --git a/frontend/src/pages/Incidents.jsx b/frontend/src/pages/Incidents.jsx index 02806416..d78276f2 100644 --- a/frontend/src/pages/Incidents.jsx +++ b/frontend/src/pages/Incidents.jsx @@ -27,7 +27,7 @@ import { Input } from '@/components/ui/input'; import { useTableSort } from '@/hooks/useTableSort'; import { useColumnVisibility } from '@/hooks/useColumnVisibility'; import { useTopbarActions, useTopbarChrome } from '@/hooks/useTopbarActions'; -import { METRIC_LABELS } from '../components/monitoring/fleetMetrics'; +import { describeAlert, formatReading, metricLabel } from '../components/monitoring/alertCopy'; import { impactTone, INCIDENT_STATES } from '../components/monitoring/monitorShared'; import { useTranslation } from 'react-i18next'; import { toastError } from '@/utils/errorMessage'; @@ -123,11 +123,6 @@ function formatWhen(iso) { return formatDateTime(date); } -function formatValue(value) { - if (typeof value !== 'number' || Number.isNaN(value)) return '—'; - return value.toFixed(1); -} - export default function Incidents() { const { t } = useTranslation(); const toast = useToast(); @@ -237,15 +232,16 @@ export default function Incidents() { }; }); + const thisServer = t('app.incidents.thisServer', 'This server'); const hostDetail = (alert) => (alert.type - ? `${alert.type} ${formatValue(alert.value)} / ${alert.threshold}` - : 'This server'); + ? describeAlert(t, { metric: alert.type, value: alert.value, threshold: alert.threshold, subject: thisServer }).detail + : thisServer); const fromActive = activeAlerts.map((alert, index) => ({ kind: 'alert', key: `active-${alert.type}-${index}`, title: alert.message, - subject: 'This server', + subject: thisServer, detail: hostDetail(alert), state: 'firing', tone: 'red', @@ -262,7 +258,7 @@ export default function Incidents() { kind: 'alert', key: `history-${alert.timestamp || index}-${index}`, title: alert.message, - subject: 'This server', + subject: thisServer, detail: hostDetail(alert), state: alert.severity, tone: statusKind(alert.severity), @@ -282,15 +278,16 @@ export default function Incidents() { // sources above describe the panel's own box and have no server-side // lifecycle to ack or resolve. const fromFleet = fleetAlerts.map((alert) => { - const metric = METRIC_LABELS[alert.metric] || alert.metric; - const subject = alert.server_name || 'Unknown server'; + const metric = metricLabel(alert.metric); + const subject = alert.server_name || t('app.incidents.unknownServer', 'Unknown server'); + const { title, detail } = describeAlert(t, { ...alert, subject }); return { kind: 'alert', key: `fleet-${alert.id}`, alertId: alert.id, - title: `${metric} over limit on ${subject}`, + title, subject, - detail: `${metric} ${formatValue(alert.value)} / ${alert.threshold}`, + detail, state: alert.status, tone: alertStatusKind(alert.status), impact: alert.severity, @@ -305,7 +302,7 @@ export default function Incidents() { return [...fromActive, ...fromFleet, ...fromIncidents, ...fromHistory] .sort((a, b) => new Date(b.when || 0) - new Date(a.when || 0)); - }, [incidents, activeAlerts, alertHistory, fleetAlerts, monitorsById]); + }, [incidents, activeAlerts, alertHistory, fleetAlerts, monitorsById, t]); // Search only. The active/resolved split used to live here as a segment // filter; it is a column rule now, applied inside the table. @@ -408,7 +405,7 @@ export default function Incidents() { headerKey: 'app.incidents.impact', header: 'Impact', sortable: true, type: 'enum', - value: (item) => item.impact || '—', + value: (item) => item.impact || '', }, { key: 'when', @@ -628,9 +625,9 @@ export default function Incidents() {
-
{t('app.incidents.metric', 'Metric')}
{selected.metric || '—'}
-
{t('app.incidents.reading', 'Reading')}
{formatValue(selected.value)}
-
{t('app.incidents.limit', 'Limit')}
{selected.threshold ?? '—'}
+ {selected.metric &&
{t('app.incidents.metric', 'Metric')}
{selected.metric}
} + {formatReading(selected.value) &&
{t('app.incidents.reading', 'Reading')}
{formatReading(selected.value)}
} + {formatReading(selected.threshold, 0) &&
{t('app.incidents.limit', 'Limit')}
{formatReading(selected.threshold, 0)}
}
{t('common.labels.when', 'When')}
{formatWhen(selected.when)}

From 07e2c76b0716177edf55ecc6a47f824546cba734 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Tue, 3 Nov 2026 13:04:42 -0500 Subject: [PATCH 064/171] fix(frontend): send /git-ext to the git extension's marketplace entry when not installed --- frontend/src/App.jsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index f632fc84..1e7486a8 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -143,8 +143,17 @@ function SetupRoute({ children }) { return children; } +// /git-ext was the in-tree git page; it now ships as the serverkit-git +// extension at /git. Without the extension that route is never registered, so +// send the operator to its marketplace entry instead of a "page not found". +const GIT_EXTENSION_SLUG = 'serverkit-git'; + function LegacyGitExtRedirect() { const { tab } = useParams(); + const { routes, __ready } = useContributions(); + if (!__ready) return ; + const installed = (routes || []).some((route) => route.plugin === GIT_EXTENSION_SLUG); + if (!installed) return ; return ; } From e6b6b94d0d84b0f0c75bcba511e98dfe8a60d736 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Tue, 3 Nov 2026 13:05:03 -0500 Subject: [PATCH 065/171] fix(frontend): show a single empty state on the firewall tab --- frontend/src/components/security/FirewallTab.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/security/FirewallTab.jsx b/frontend/src/components/security/FirewallTab.jsx index c9fbd592..c44e300c 100644 --- a/frontend/src/components/security/FirewallTab.jsx +++ b/frontend/src/components/security/FirewallTab.jsx @@ -447,7 +447,8 @@ const FirewallTab = () => { return (

- {partialError && } + {/* With no firewall installed the rules/blocked reads fail as a side effect; the call to action below already says so. */} + {partialError && status?.any_installed && } {!status?.any_installed ? ( Date: Tue, 3 Nov 2026 13:05:35 -0500 Subject: [PATCH 066/171] fix(frontend): compact the import wizard stepper on phones --- frontend/src/pages/ImportWizard.jsx | 3 +- frontend/src/styles/pages/_import-wizard.scss | 28 +++++++++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/ImportWizard.jsx b/frontend/src/pages/ImportWizard.jsx index d61142e0..0c07c5b4 100644 --- a/frontend/src/pages/ImportWizard.jsx +++ b/frontend/src/pages/ImportWizard.jsx @@ -417,12 +417,13 @@ function ImportWizard() { {STEPS.map((label, i) => (
  • {i < stepperIndex ? - {label} + {label}
  • ))} diff --git a/frontend/src/styles/pages/_import-wizard.scss b/frontend/src/styles/pages/_import-wizard.scss index 755258ee..deca13d8 100644 --- a/frontend/src/styles/pages/_import-wizard.scss +++ b/frontend/src/styles/pages/_import-wizard.scss @@ -5,7 +5,6 @@ .import-wizard { max-width: 960px; margin: 0 auto; - padding: $space-6; display: flex; flex-direction: column; gap: $space-6; @@ -31,6 +30,10 @@ padding: 0; list-style: none; overflow-x: auto; + + @media (max-width: $breakpoint-sm) { + justify-content: space-between; + } } &__step { @@ -67,9 +70,30 @@ content: ''; width: 16px; height: 1px; - margin-right: $space-2; + margin-inline-end: $space-2; background: $border-default; } + + // Phones: only the current step keeps its label; the rest shrink to + // their numbered dot and the row spreads to fit instead of clipping. + @media (max-width: $breakpoint-sm) { + flex: 0 0 auto; + padding-inline: $space-1; + + &:not(.is-active) .import-wizard__step-label { + display: none; + } + + &.is-active { + padding-inline: $space-3; + } + + & + &::before { + flex: 0 0 auto; + width: $space-3; + margin-inline-end: $space-1; + } + } } &__step-dot { From 184870a8bdc64afdc6505180fcad82babbf12458 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Tue, 3 Nov 2026 13:08:02 -0500 Subject: [PATCH 067/171] feat(frontend): shared scrolling tab strip with edge fades and active-tab reveal --- frontend/src/components/ui/tabs.jsx | 17 +++- .../hooks/__tests__/useScrollTabs.test.mjs | 28 ++++++ frontend/src/hooks/useScrollTabs.js | 87 +++++++++++++++++++ frontend/src/styles/components/_tabs.scss | 37 ++++++++ 4 files changed, 166 insertions(+), 3 deletions(-) create mode 100644 frontend/src/hooks/__tests__/useScrollTabs.test.mjs create mode 100644 frontend/src/hooks/useScrollTabs.js diff --git a/frontend/src/components/ui/tabs.jsx b/frontend/src/components/ui/tabs.jsx index 89b3c6d9..ccf36194 100644 --- a/frontend/src/components/ui/tabs.jsx +++ b/frontend/src/components/ui/tabs.jsx @@ -4,12 +4,16 @@ import { MoreHorizontal } from 'lucide-react'; import { Popover, PopoverTrigger, PopoverContent } from './popover'; import { cn } from '@/lib/utils'; import { useOverflowItems } from '@/hooks/useOverflowItems'; +import { useScrollTabs } from '@/hooks/useScrollTabs'; import { t } from '../../i18n/t'; import { Button as SharedButton } from '@/components/ui/button'; const Tabs = TabsPrimitive.Root; -const TabsList = React.forwardRef(({ className, children, ...props }, ref) => { +// Default: tabs that don't fit collapse into a "More" popover. With `scroll`, +// the strip scrolls sideways instead (edge fades, active tab kept in view) — +// the better fit when every tab should stay one tap away, e.g. on phones. +const TabsList = React.forwardRef(({ className, children, scroll = false, ...props }, ref) => { const childArray = React.Children.toArray(children).filter(React.isValidElement); const [popoverOpen, setPopoverOpen] = React.useState(false); const itemRefs = React.useRef([]); @@ -22,7 +26,7 @@ const TabsList = React.forwardRef(({ className, children, ...props }, ref) => { return active; }, []); - const { containerRef, moreBtnRef, hiddenIndices, hiddenSet, recompute } = useOverflowItems({ + const { containerRef, moreBtnRef, hiddenIndices: overflowIndices, hiddenSet: overflowSet, recompute } = useOverflowItems({ count: childArray.length, itemRefs, gap: 8, @@ -30,8 +34,15 @@ const TabsList = React.forwardRef(({ className, children, ...props }, ref) => { getActiveIndex, }); + const hiddenIndices = scroll ? [] : overflowIndices; + const hiddenSet = scroll ? new Set() : overflowSet; + + const scrollRef = React.useRef(null); + useScrollTabs(scrollRef, scroll); + const setContainerRef = React.useCallback( (node) => { + scrollRef.current = node; containerRef.current = node; if (typeof ref === 'function') ref(node); else if (ref) ref.current = node; @@ -56,7 +67,7 @@ const TabsList = React.forwardRef(({ className, children, ...props }, ref) => { return ( {childArray.map((child, i) => { diff --git a/frontend/src/hooks/__tests__/useScrollTabs.test.mjs b/frontend/src/hooks/__tests__/useScrollTabs.test.mjs new file mode 100644 index 00000000..6a733e47 --- /dev/null +++ b/frontend/src/hooks/__tests__/useScrollTabs.test.mjs @@ -0,0 +1,28 @@ +import assert from 'node:assert/strict'; +import test from 'node:test'; + +import { scrollEdges, scrollTargetForItem } from '../useScrollTabs.js'; + +const strip = { containerWidth: 300, scrollWidth: 900 }; + +test('centres the active tab in the strip', () => { + assert.equal(scrollTargetForItem({ ...strip, itemLeft: 400, itemWidth: 100 }), 300); +}); + +test('clamps to the start and end of the strip', () => { + assert.equal(scrollTargetForItem({ ...strip, itemLeft: 0, itemWidth: 80 }), 0); + assert.equal(scrollTargetForItem({ ...strip, itemLeft: 820, itemWidth: 80 }), 600); +}); + +test('a strip that fits never scrolls', () => { + assert.equal(scrollTargetForItem({ itemLeft: 50, itemWidth: 50, containerWidth: 300, scrollWidth: 200 }), 0); +}); + +test('edge fades appear only on the sides with hidden content', () => { + assert.deepEqual(scrollEdges({ ...strip, scrollLeft: 0 }), { start: false, end: true }); + assert.deepEqual(scrollEdges({ ...strip, scrollLeft: 300 }), { start: true, end: true }); + assert.deepEqual(scrollEdges({ ...strip, scrollLeft: 600 }), { start: true, end: false }); + assert.deepEqual(scrollEdges({ containerWidth: 300, scrollWidth: 300, scrollLeft: 0 }), { start: false, end: false }); + // RTL scrolls into negative offsets; the magnitude decides. + assert.deepEqual(scrollEdges({ ...strip, scrollLeft: -600 }), { start: true, end: false }); +}); diff --git a/frontend/src/hooks/useScrollTabs.js b/frontend/src/hooks/useScrollTabs.js new file mode 100644 index 00000000..04d28965 --- /dev/null +++ b/frontend/src/hooks/useScrollTabs.js @@ -0,0 +1,87 @@ +import { useCallback, useEffect } from 'react'; + +const ACTIVE_SELECTOR = '[aria-selected="true"], [aria-current], [data-state="active"], .active'; +const FADE_THRESHOLD = 2; // px of slack before an edge counts as "more to scroll" + +/** + * Where to put scrollLeft so an item sits centred in a horizontally scrolling + * strip, clamped to the strip's range. Pure so it is testable without a DOM. + */ +export function scrollTargetForItem({ itemLeft, itemWidth, containerWidth, scrollWidth }) { + const centred = itemLeft + itemWidth / 2 - containerWidth / 2; + return Math.max(0, Math.min(centred, Math.max(0, scrollWidth - containerWidth))); +} + +/** Which edges still have hidden content (drives the fade masks). */ +export function scrollEdges({ scrollLeft, containerWidth, scrollWidth }) { + // scrollLeft is negative in RTL; the magnitude is what matters for both ends. + const offset = Math.abs(scrollLeft); + return { + start: offset > FADE_THRESHOLD, + end: offset + containerWidth < scrollWidth - FADE_THRESHOLD, + }; +} + +/** + * Shared behaviour for every horizontally scrolling tab strip (pair it with the + * `.sk-tabscroll` class): the active tab is scrolled into view on mount and + * whenever the active marker moves (aria-selected / data-state / .active) or + * the tabs themselves change, and `data-fade-start` / `data-fade-end` mirror which + * edges have more to reveal so the stylesheet can fade them. + * + * Only the strip scrolls — `scrollTo` on the container never moves the page. + */ +export function useScrollTabs(ref, enabled = true) { + const syncEdges = useCallback(() => { + const el = ref.current; + if (!el) return; + const { start, end } = scrollEdges({ + scrollLeft: el.scrollLeft, + containerWidth: el.clientWidth, + scrollWidth: el.scrollWidth, + }); + el.toggleAttribute('data-fade-start', start); + el.toggleAttribute('data-fade-end', end); + }, [ref]); + + const revealActive = useCallback(() => { + const el = ref.current; + if (!el) return; + const active = el.querySelector(ACTIVE_SELECTOR); + if (!active) return; + const box = el.getBoundingClientRect(); + const item = active.getBoundingClientRect(); + const rtl = getComputedStyle(el).direction === 'rtl'; + // Item offset within the scroll content, independent of current scroll. + const itemLeft = rtl + ? box.right - item.right + Math.abs(el.scrollLeft) + : item.left - box.left + el.scrollLeft; + const target = scrollTargetForItem({ + itemLeft, itemWidth: item.width, containerWidth: el.clientWidth, scrollWidth: el.scrollWidth, + }); + el.scrollTo({ left: rtl ? -target : target }); + }, [ref]); + + useEffect(() => { + const el = ref.current; + if (!enabled || !el) return undefined; + revealActive(); + syncEdges(); + el.addEventListener('scroll', syncEdges, { passive: true }); + const resize = typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(syncEdges); + resize?.observe(el); + const mutations = typeof MutationObserver === 'undefined' ? null : new MutationObserver(() => { + revealActive(); + syncEdges(); + }); + mutations?.observe(el, { + subtree: true, childList: true, attributes: true, + attributeFilter: ['aria-selected', 'aria-current', 'data-state', 'class'], + }); + return () => { + el.removeEventListener('scroll', syncEdges); + resize?.disconnect(); + mutations?.disconnect(); + }; + }, [ref, enabled, revealActive, syncEdges]); +} diff --git a/frontend/src/styles/components/_tabs.scss b/frontend/src/styles/components/_tabs.scss index 3296228e..b5998534 100644 --- a/frontend/src/styles/components/_tabs.scss +++ b/frontend/src/styles/components/_tabs.scss @@ -24,6 +24,43 @@ } } +// Shared horizontally scrolling tab strip. Pair with hooks/useScrollTabs, which +// scrolls the active tab into view and sets data-fade-start / data-fade-end on +// the edges that still have content to reveal. Used by and +// any hand-rolled nav (Settings) that needs to survive narrow viewports. +@mixin tab-scroll { + --sk-tabscroll-fade: 28px; // geometry: edge fade width + flex-wrap: nowrap; + overflow-x: auto; + overscroll-behavior-x: contain; + scrollbar-width: none; + -webkit-overflow-scrolling: touch; + + &::-webkit-scrollbar { display: none; } + + > * { flex-shrink: 0; } + + &[data-fade-end] { + mask-image: linear-gradient(to right, #000 calc(100% - var(--sk-tabscroll-fade)), transparent); + } + + &[data-fade-start] { + mask-image: linear-gradient(to right, transparent, #000 var(--sk-tabscroll-fade)); + } + + &[data-fade-start][data-fade-end] { + mask-image: linear-gradient(to right, transparent, #000 var(--sk-tabscroll-fade), #000 calc(100% - var(--sk-tabscroll-fade)), transparent); + } + + &:dir(rtl)[data-fade-end] { mask-image: linear-gradient(to left, #000 calc(100% - var(--sk-tabscroll-fade)), transparent); } + &:dir(rtl)[data-fade-start] { mask-image: linear-gradient(to left, transparent, #000 var(--sk-tabscroll-fade)); } + &:dir(rtl)[data-fade-start][data-fade-end] { + mask-image: linear-gradient(to left, transparent, #000 var(--sk-tabscroll-fade), #000 calc(100% - var(--sk-tabscroll-fade)), transparent); + } +} + +.sk-tabscroll { @include tab-scroll; } + .tab { display: inline-flex; align-items: center; From 4474a4033a3c0ad61bba52b7d5e288bdb10554a5 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Tue, 3 Nov 2026 13:08:02 -0500 Subject: [PATCH 068/171] fix(frontend): settings tab list scrolls instead of wrapping on narrow screens --- frontend/src/pages/Settings.jsx | 8 +++++- frontend/src/styles/pages/_settings.scss | 32 +++++++++++++++++++++--- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/frontend/src/pages/Settings.jsx b/frontend/src/pages/Settings.jsx index c4c1036d..ef0fd64f 100644 --- a/frontend/src/pages/Settings.jsx +++ b/frontend/src/pages/Settings.jsx @@ -1,5 +1,6 @@ -import { useState, useEffect } from 'react'; +import { useState, useEffect, useRef } from 'react'; import useTabParam from '../hooks/useTabParam'; +import { useScrollTabs } from '../hooks/useScrollTabs'; import { refreshDevMode } from '../hooks/useDevMode'; import { useAuth } from '../contexts/useAuth.js'; import api from '../services/api'; @@ -57,6 +58,9 @@ const Settings = () => { if (requestedTab === 'modules') navigate('/marketplace', { replace: true }); }, [requestedTab, navigate]); + const navListRef = useRef(null); + useScrollTabs(navListRef); + const activeGroup = isAdmin && ADMIN_TABS.includes(activeTab) ? 'admin' : 'account'; useEffect(() => { @@ -96,6 +100,7 @@ const Settings = () => { onChange={(group) => setActiveTab(group === 'admin' ? 'users' : 'profile')} /> )} +
    {activeGroup === 'account' && ( <>
    diff --git a/frontend/src/styles/pages/_settings.scss b/frontend/src/styles/pages/_settings.scss index 721dc98f..352c3af5 100644 --- a/frontend/src/styles/pages/_settings.scss +++ b/frontend/src/styles/pages/_settings.scss @@ -8,8 +8,11 @@ gap: $space-6; min-height: calc(100vh - 200px); + // minmax(0, …): the nowrap tab strip must scroll, not stretch the column. @media (max-width: $breakpoint-lg) { - grid-template-columns: 1fr; + grid-template-columns: minmax(0, 1fr); + grid-auto-rows: min-content; + min-height: 0; } } @@ -38,8 +41,6 @@ } @media (max-width: $breakpoint-lg) { - flex-direction: row; - flex-wrap: wrap; position: static; max-height: none; overflow-y: visible; @@ -49,6 +50,28 @@ } } +// The tab list: a rail on desktop, a single scrolling strip (edge fades, +// active tab kept in view — see hooks/useScrollTabs) once the rail collapses. +.settings-nav-list { + display: flex; + flex-direction: column; + gap: $space-1; + + @media (max-width: $breakpoint-lg) { + @include tab-scroll; + flex-direction: row; + align-items: center; + + // Section labels become inline captions between groups of tabs. + .settings-nav-divider { + flex-shrink: 0; + margin: 0; + padding: 0 $space-2; + white-space: nowrap; + } + } +} + // Two-way section switch (My Account / Admin) at the top of the settings rail .settings-nav-groups { display: grid; @@ -61,8 +84,8 @@ border-radius: $radius-control; @media (max-width: $breakpoint-lg) { - flex-basis: 100%; width: 100%; + margin-bottom: $space-2; } } @@ -138,6 +161,7 @@ @media (max-width: $breakpoint-lg) { width: auto; + white-space: nowrap; } } From 35394db72c61b3c48e51909b84e5920cf2dcb84b Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Tue, 3 Nov 2026 13:08:02 -0500 Subject: [PATCH 069/171] fix(frontend): notifications page uses the shell's fluid width --- frontend/src/pages/Notifications.jsx | 2 +- frontend/src/styles/pages/_notification-center.scss | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/Notifications.jsx b/frontend/src/pages/Notifications.jsx index 19fbf41a..7741252b 100644 --- a/frontend/src/pages/Notifications.jsx +++ b/frontend/src/pages/Notifications.jsx @@ -97,7 +97,7 @@ export default function Notifications() { } title={t('app.notifications.notifications', 'Notifications')} - meta={unreadCount ? `${unreadCount} unread` : 'All caught up'} + meta={unreadCount ? t('app.notifications.unreadCount', '{{count}} unread', { count: unreadCount }) : t('app.notifications.allCaughtUp', 'All caught up')} actions={( <> {isAdmin && ( diff --git a/frontend/src/styles/pages/_notification-center.scss b/frontend/src/styles/pages/_notification-center.scss index 60aecf08..3cf77117 100644 --- a/frontend/src/styles/pages/_notification-center.scss +++ b/frontend/src/styles/pages/_notification-center.scss @@ -1,9 +1,7 @@ // Notifications history page (sk-notif-page). .sk-notif-page { - max-width: 760px; - margin: 0 auto; - padding: $space-5 $space-6 $space-10; + // Width and gutter come from the page shell, as on every page. &__filters { display: inline-flex; From 545c2f0607c245eb17ddc67787f9242e0f9ee70a Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Tue, 3 Nov 2026 12:58:36 -0500 Subject: [PATCH 070/171] fix(ui): give App Map canvas a definite height so React Flow renders --- frontend/src/styles/pages/_app-map.scss | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/frontend/src/styles/pages/_app-map.scss b/frontend/src/styles/pages/_app-map.scss index 09d48894..3063b1af 100644 --- a/frontend/src/styles/pages/_app-map.scss +++ b/frontend/src/styles/pages/_app-map.scss @@ -64,8 +64,9 @@ } &__canvas { - flex: 1 1 auto; - min-height: 480px; + // geometry: React Flow sizes to 100% of its parent, so the canvas needs a + // definite height (a flex/min-height box resolves to 0 and renders blank) + height: clamp(360px, 65dvh, 760px); border: 1px solid $border-subtle; border-radius: $radius-card; background: $bg-card; @@ -76,8 +77,19 @@ display: none; } - .react-flow__minimap { - background: var(--bg-elevated); + // Theme React Flow's default (light) chrome via its own CSS variables. + --xy-minimap-background-color-default: var(--bg-elevated); + --xy-minimap-mask-background-color-default: rgba(0, 0, 0, 0.45); + --xy-controls-button-background-color-default: var(--bg-elevated); + --xy-controls-button-background-color-hover-default: var(--bg-hover); + --xy-controls-button-color-default: var(--text-primary); + --xy-controls-button-border-color-default: var(--border-subtle); + + // The minimap covers a third of the canvas on a phone. + @media (max-width: 639px) { + .react-flow__minimap { + display: none; + } } } From 600b96befce9af89d912da7d99cbce0c8afea20a Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Tue, 3 Nov 2026 12:58:36 -0500 Subject: [PATCH 071/171] fix(ui): replace corrupt IBM Plex Sans 400 woff2 and guard it in font lint --- frontend/public/fonts/ibm-plex-sans-400.woff2 | Bin 22588 -> 22588 bytes frontend/scripts/check-font-integrity.mjs | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/public/fonts/ibm-plex-sans-400.woff2 b/frontend/public/fonts/ibm-plex-sans-400.woff2 index ab60668be06cf021524b8dbc27577616f10a722c..f0ee65dd7f3ed64dc8d674e5c6007a0e7761bd57 100644 GIT binary patch delta 12397 zcmV-zFp|%_umQZV0iY0n7=~dO-j~@~eb~GSXfUvh8W$jrPe>r$_XYq{H8V9LG^86bglk)HFNi z0XqNyeEOB2r++u`r{!EFfT&Z!@-7UXRO!Am#}EWT5M+M=!9%})1-t{i2mItLbwH=r zL^dJp%N>|A2w5IVr=m!rmPZ3(l6Y4h%uVN^=){Nx>O-v9Jig!FN2C#4J|#1i>nfy* zYHFxebvZfGM=-TO^GwV)0oaPK?ImdY}^e!5wDNX6MfZN>RF88>Cn8zng8__Nubh<$hghr#$XtaLwym-M& zUftITmO#tdHl7;0gFi#Y#l6~Rks-=QR~FL=F2gcD_P(PBpd+4n4IrWF#HALJB*|RE z07r2hqclU~RF89>^oCF{UGK>TO008_TAVBOSkA+n9gg<-~ca8zLu~%X_ zW|T%IajfG@O$bDXD(7P7q!e@&(oD-#1AWiapAKg@%Q?<-A-m3SV`jfuqjVJEC9h_0 zUuMc?Gz~X@fk}&S38lo%$p|TRT}8u;95&U2*|}`~X4_===4clJw(h0DE7#EICo_Tp zRt8RLlY(n^&>|27K@fCO+Bpn{VHk$(Z&3V90>Ib~h7f+T5;nt>>F&186r*qz%?@-_ zIxq()XP+$!h59U%uK7*?*3NMnPt4cY(KVr*WvmB(&W0Fp<-^|_Lr+b_X&HgzIF927 zIDP(5z;+H7#(<6c1kT$LIk30Rtu^RyVpx;-e%Eyl`%6)cO}E8M=ty;ZYUJWt!IhcjG|agQyP|Fu>dPh3I+mj zJbv?kJ!y~9|1INfS%7RTzf%R7LMdL|Lt_tn+2{9@9mpKqJjB>lEt;dgWKHQlWxH$h zL>GlZp-{J1S^?d48HGZjP^i9g8Ln_Oy#{b@b~D`KHg~woJ>#!C2HrM`_ZSzj#u_x} zNYJ-R^RRQOG6ASq!;b{`j0FR+OtqaL90xpqMRzL>Qd~|;hXVGg{W+R+h@I3gK7pN#%1Zv+r?>yCCMHJttQCLv1;^kbh^d(iG7qL9 zYG$T5UF8w%1e!^1pC=Zu#b$}sYz?sPH(VOQ$IHwz7y_>vC8en%TNA_^h?0b^#KfiA`L# zL>Q(6!YZ3(qy!F6^+*EI{>7F^>j^8sR-)V6TO5K7PaPBL!yuf95>N|s@skK%hd2kO ze)qwNPtu74GKU=lA0r!Gkx)ngLI@#$gd|T$l2n-hASv>m>H>|Pg`D9m=Qz)WPjL}o zW0Qu+NFQWItE=#ob_~Ymxw59K?3l1s$>B4 z1aX?9#C&StSBjt)7LKkG@G;^hcHrqN5T{S^JfyINZC07u+e4kN_Lj+JtMRsfzCj4f zb;mr4wC{SQkA4OiWQgHB*?CrJlJTT=TCMe_VtKs9AzFkMv4OEp!FWf*{cp32F2sA) zht2&f)`gM;-=1mAsQg14&u)dJ!|hfjhoxun@Z<|S3Qi)#xaemg* zA^*;Fm+Ab0AX|yRbpZCChFd$x>^HrDBOWsokR9YxO0ZHu8LoSNbY`r7JQ_&=QqnkZ zGITDGj5Ou^C10`>~uaHPr(-D$nhj=dv-1-lPh_Hd~(9$i;@*%JGbvi z_9FY5{i~-v&7t6k!;@HliNz`4pEHL}nzLukbm)~%fFKBhp!bgQ#*svur+}~X{B?FI zw_c0G4ZpD)ejvI6=;jOoZQXEM5^KfZ`~baW(9a?TW58>IKJ=lRK6KZuXx9D4GklN8 zTx<~b%$W)4h4FYS}L>waTZ*?3ofN-1UgJ@Gt;xQBBafl)jTWEwX=3ZIs^SSc<>x9>EURrLyfrCIgs zvN4KdLj48n=H-n9Oa)zqJCFs}aZ{|OSHuNK;26Y}7;Y4W8=;H$%P3=vGvN-?qV)4K zOZJd5NlDzkE z_{qe@l%H{bYwo8>j=sfKP66w6eC8^8UOM7kPd^&hCvcYQNCp7Pl2EQQ>B_IV?15_n zHH7kjlu}o?Gh~}5!3Zi9HHzYa0m%UyJv23aPcfrx&%q+<*R{&P^vMn~8LXDh zPLqsz-}G;mj8?D-VIMeB&g@u{#Sur0R%{`3j&4(bYyELylk$o!?YH5A6oW!Zi#?V( z7Lcx3520$~-zHPit&l3Jsi9WY<>*mBBTY2Zveg<(GlC!pf*=q<5bfA9W6hd1Yu2pS zF7TR<^-3T83^2$L!w#g1G?e5QgO2xMskfG&CjqX+s9i)c>tz8m!KjPn)p>St>=(37 zyb&CKaVk2JHjX=@DEI&Pv^Ot)IaTBsARUrQ{--X5!CV3cIMiyHG6O=Ir%+oPW3gPt zk(6qa2GggleR{|+VQLCWg;HGY6|!UwrB3MyJYr@!cO}XK-RMLH*|aNkK>>kMv`jUd z)CwBjbR(S)l{8hvMX;{?r^`1q$4wWFcN1NIsL(?oKOF0z9+Ap{cP%y1+a6I|KUpEXD$O*GR&52rc9SzUvBn2&`&XTk0GR8$+AwgHN!LSk?Mn~F&1ArAQ&5jP#a^#}Wj)I8# zyB4?Ds$v%+RkGD#*i7uDVt4FM&!srqCC=@xB)8Yoc)f4!55_pf%>Y4y5DqglGXnqs z003rJey7_u3!E56mnKh-gvGEmHnyC9wg-7t29A?1bSS9J4T)I*Rp$!W16Y9+hA})( zgn|>{d+xzCM}tLDPnYo3w?elyts#PMJzAU!lLzHtU`VZp$_#PlY}Q@rM*>o>5% z5)jl=u`zw^hks@UtUOx(NvZT5yEz0(1Y{@dnF-$x-7O-o)I6~fD-rvYOHciOQ3ty0 z+2*{fK!{~ZSTa=jQ1DX}peDOj24%sIkyXpyH@rBBlreTt3Wk6{gyIdjMS%eFyl*%}>&VuE8v7?YU=IkWC3ys}!O!|ZXIh<45@8Q6 z(m7>_kV!+41`QpU{Gpt!J-i5iioN*A9Ve0o9f;Ak*IzU|YHZ&m&9t=JM0c-KPU=e$ z&Ty70h037HKdNGvJBEN9h7R&v|77*j;xIse!H8Lze{A@5 zJ+9XRY=EZ~lGp+qY`>$pVtEh~3R$V(HqMSW7gm4?$kLQ zn@K-dd#Cl&ys2i&oRpJnvY1Hv%cvb6j%&vyW7{}(Y#igqpi$yYF`9j!9hvQ(Et|E> z>SpD$+*$g=^x^05Md|&2%3ls^hq1%ZA$|HgU-C=N=&Ln?@wYoX;kWuwv^67r^utTA zrnWT?@;@95hS{GW?Ngi6rnT~x+CrM5xi?wkVr|{6%!(+hipbks&)IaqtRM&&kPsRN z#v?@2UnsoA1drJY=XIovPnfW1+~tybt%x}q9WHlu-_xEoYd=$zX=E^GirmMmD~%5DTpT1Wyc2Nr%sMd zoKZMOSo_s3ai24Vi!%#pw~7CmXPnmkKCs)eajX|9_ZO89w*IlVqs|n{rDJzd`hCbG z>NoXg->nX|Q?GS@KVBMPPM0gMQ2W*oRxkUD>|%?FT`pJTD%XY@H+j=rMkcHrzC2vq zv~hee?Zx?-xf#NU{EE36#m-Io>PRoK-fQT?}?NGuiBg4|7B`K8KS0oHZuDifulTo#%oo|1* zi4Y1$Yjt*i{?DXrrl9uftaz~qi%_#754~@Yf8`{C*Ocfx;+qdBNwS4)*)E3N*`FwXajP&4 zjGT6V*EV1CfYJ+n^fSO9Lkt_~A`3DA)Q+4$;z7^|PbEa)%DcnVZ0L6v5Wnx%Dg3`~ zJ*5)|*X!q|=>K|Y#ERGvD`xvtmr~MFT6#*!Xw$!HdH@Hwj?T5ff9tm>q5v{{zDtc1 ziZR{qXaWi43854;A(Q9CFgA|KsA()TDkz~m3-xzn(1P%tC>B zy`}(9eLi9G9#!OXgn1M}VFGX)4Xy_E1Heh=aSWWmtbYUg{~Z`EiQ#rYF9T}8hk)%c zz!0+f>F;>}eD~FrjmQDqeb-ot=Z64%c(L)`^T6kp&zWcU*LSXu z*GFsXwSgu;dJr{m4R9Oqm>D1^10csHJiX#aCCKPJlOtq_(`ce{!PIi)X)r{LP?3s7 zi#5tfEpmj&SE4|Z2tCjVY{$dPR;WUe=CB~sI1`LDNu`0b2CI>7Ot?^g<()diRP^P4 zx61};^``vVYJ>M*yvja$=4~6`Qtg-m+us;P(A{_U=2d``|n6e*yib&kykuBukVeCH3ec zfnSI4>otCv;e+1S{d-@3qWkY&-unPF5U_1nzi#ckxpPKmkIb4mWBTyW;6Q(0Z%=nu zXGeQmYfE!eV?%wkuC}JSsv6lB4!g~2F`HPVwF3Fk;Xszs z#By_WG+0v!spaPJU@b#v5#6~fIA958=uCg)+AVF2*KA5;NC11Y-zRb&Fxq&$=$P^GBR z3BM-h_7{f()-z@-8+I$%fFvO6nuO-PHmj7;CCE}WU(IRX#V1@L8c;gOu=X8c6i6Xn zU|hj^{_>)S+WHrNL@bsBgfXXE@19U-dEMX1WfEbDD_$*7)nLxX*V_^8bX`gN$tt@jHJNrr#D7{FOcjCqUeeW;kH&d z5NgOZzZ1L0MTKgZ+h8iJM$~wyjVmDFqPMEfnvG$ubtWe`S!*ZdO&f>Z=%?C`=t8$VmVwT>#*O(e%F%|0!@A?Mm@ ze%|bh9hPc;1}_Vy={+5+$QzY1Kj)9s00gSL;3Cw+45nt$js1%mX?;dW9=((ovRxsJ z7+A3MgwxxZkg4pMdX|vF>}^u48c2&q=H}1Ub6bd_4&YM2pX4^T>CS68$a5l?fqSLb zK0+>FID!=oofr%mENTl?V$<4L#VERS3C>z!!w$!8B zY<%5I3P#GbN)^EjRRjm6Pr&@@ zdvNj9EIta%^MfZyyD=%##?9~}z|`u0%;rKmcq;UOiJZjgs`|Un-MxVkRlitL6JY=BH2+fvybe#SkS1TrF*X0!1WaHezMqMPb3K!ZIy(ag?3{iu8L<@^Aa=6kMaOI3)v#&D>Ef@(+D+lRv{RpV5XBntME}9jr3h=Lg6j-W2 zMJIa;DG4+!AfJDy@UH|YiU&s&_f3S+TU=_0;_}mz@*vM`VL3}D4jf>Uev+q*5U~QW z8duCxzn0t0cf7pd#CO#yFuap0kBqDO=#D@%M7CRYz(lAh!xrG3;P3}Ej)78igoI3E zBSv6}j)p#Xa&2=b*aQ1;ZM7Dsz?S*#sGrwLSvSv)da<)f$+vC z5)n>Dfix{Lk2SO~v-rGe6w^3Mj)xnfv%JZzv6Piit!?6V@?DQaQ;tA?J%TcUBijB+fO3r?>5xNUn*gOp-UX3>KTdAidCY@U9yJK9v}O)OHo zcA?9X5p#c``{3%k|LsjFQ*^WIBS3KKx&vYJjKm^4>!}(YQIBO08z$~M3R3(3AXYG- zv`K{ivO!Ov-oCTe$u+)z6Rf=76u!PG(d!6iv%)(SF6}askXSHq?NUx>jQE%NF!~+i z?T=Q*s~DG#bIP8mC!UbWTZ}kIV9I4uA9~*8 zYT1%+vFb#qG02@9+oZ&ygr}TPxn~TfH)Hyd5l4o5S4VlaKhL0lx+%Z{ll-M&Lk~Lq zmC3vrL(-?tn1mf~c`2ncicM7O%)P^X2M$nIWS*bFLwP>`MA=s;Z*jV+J``+vs=cXP zpkHozJaQZisDgQM^c`XtdNgfN+&77|4&!7@M%XwnR(Hxspg+-E(gBMkY_rco;sC)o zxLv0JvJ`;Y46-kOSoH?Lh6{jp7pM!sx&y$AiH?FmyKAuHnIjWt4TqrOA!7W@8bO8h zFQWhW;GV5B?>SY4biQKXA+w;6XY-bsgqq>}K9>-iQh4QQo|DV0)yx%8UO-=RkZH&* z3)y+(A!Jr$>J|{S`8LZO-)@DJ$FvVx%jmgz)eP51mcJZ-ZNj9>#ht|gyT3QzMzNPB z*PhiKi947a{>&cfZQS{aBHu0-}qG!KW8NlBvYRqmIspM;zQPSsFVRQZF8V86>HEo$;e_k+`}6B zWZ{E7W5Fc-HmR6&I7pL|%zbz}ASJG|Pa<4@kZ%1ao??=6dlIDG=090`cVBL*xT_D4Q@4VRxuW3FSF=eUj((gL9gGVv3I}0F0|DP%S{7x8tZ-V z;R;iKB~`@JRmtQ8sWFh8p|hz0!1s~dJ&(jW(Pc!M1Zly6r-&&b$ zMH;I)M@`F1#tC8ivkLp&dhu|++RQY9p8IVppNUW{z1%wPvvwX}alNQ~OH{~fLRPd=nRJ@ zji(oTdibkg=18N@D!(<%te7tW8-Gyl6itlD9_j}$=(#~TpwzV4i+ze z?}r`&@f7Xr2w4KKBIKl^a{TJCZpSSq!H0@8^+{47Yvrnw2>S7$!PA(7&;3i01$p^* zF9JX)Q-_if*rg4IlI#pi;4{M@-W>sdtb8Pz4)bGgN98-uA_{0=>asf&Q)YLMocXY& z;FS3%8N7hkpNyFCq2bm2jvNATz9Jrfn?Ocf03>}{tX!5jmT&F7rxB3_wnXCBOR3z1 zl7ip+J%yae#vxn_gv@iHQ7?5u>&$bnrqqbecGu%x<8>^PZO{G-kG+}Q)9J$5`?jx+ zXy>Y-z#*>@PY6*-`3Z$3IaWTiIpFS>ZoO?xs{hkCnS$?iA;@Xiy$VT4>Z8?v=$OY( ztvSU#uG#d&L=?s;@$)J4el$LvFVqz`XOF?CVKkHWve>*Sc|&jSupRoF z_13hXexlE@^PWVcHfHO!Ep~r)x{Z==sS6E+m5z=$zGWrtZG^?E$#>qrw(I^NR?e8w zrY0crb1Tj#;@js4lNweythr2oU;4s$9BVrrG|&Ca7{0{C{n;crT(v)dGxN$Y?&haF z*s>d<$vL*e3~2+7r5suPi*|@usB|_BO=48h{ocO#yP55#SW~?t=TB-^WO!R5R-KFF zH5dsC@RB~pg3kGP#V`L-c~M$>70rdvOe)e0EX`5X>xB9N&Q2xECALC;&AQ&54&-MD z4y{@4U`TQ_S~JYrH`cw?iw_oOnPKp^RPmPpi6|=egH}ynnx*F)&egi;^zpN=tSXEc zG#62bX5?Bi9l~R$9hv{jQ0~S?&V5K{W!inUjp&%kN0-H>zka31oCkPD#RFH+TAAB0 zcjLEsxFUbgnX`c}9BYk#-*=oMG(&S*LPOwo?oi`^*;^B(LiNQe+buW_am86I3=o)s z6};5lz>bydr&Zw##9*+{QTp>)qX%{=7G@10P1b#m&71Pj2o>8zttW01pq0pw!8lx; zPHeBuw90IV%Q`GE^^43SqN|G$OGR|S8U2-+Z=n~uqV?h$l!FF;O=g)adNM&onTO-& z*%3-}V_A_dBM&Y}z1|a#t&+`S4$P8;y(S!l^fgtDy+~fpRdSOV2g-w9<&Iq6gL~+kQeQpMZDl}jJ3Gl71EIH% zo1nL_;_O{^3kp$9l%{?22hcj;WWTGMUgQCR!X z)%C$e(2tw1eLm!CjO+hJuV`W3! zqcQuZ%LtQO!^R6Iw8OBt*HJUkovfwt)qSEVS6`oI@c-5#v_3G$L|ygYmV!8UbXXzq zycLv7H|8RLryb#8&iOH|-`Ct|_acMTHnOMdYq}PF4A5)Ue%O$9$Kmr4JwBjmF5YT< zF~!hG+{ufi^(aZ=gyzoJ%+)5y!SKGz8XzI3Y_G9;p^A~vHhcU<*1}Gv6hpLoqc`Qoi6MoupN)SleWaHk{4??Yvw~(O| zqM&R`%V*$$?Tt!b&2(fj7i?bVLMivcLg1Vg!-4CCVz%itiw7V;$vt*(XCPdIa0s#l&0>Ua zUpu!FoSOYdl6fAMp=TzU>Ogg$&j*;F7!y(j$lI-q&TPmNvWP8w&HUN*M$0!`kV!Z3 z zg#)`Yw>WT&Z;ayAcQ%Y>dFPn)uG_1pv5S(j-odL{7 z!H67DlSa7|am*o$REC(9ghWA2pU+2_^AVK>}p6s6TwtaqViTQ8drWlt^(+h!?aVd7cu5{#b?4;x2(=W#3{5dycmtP=e>>4U{ zKOQ`?<06A?@-mvQWO)Wlv;0`%(WOxSK(1+6$C)L~X$T=760m%K;qT)of$hQ9!~m8U zfR{y-$OI`+RpFC4omFw<`@7Hc)PiD57~BOQpiA}GP#;lAYms(DT3fCL#cqlSk|JZaAL^J>bQL;u0+m(B z&EqCL%&RY{UlJ?{0yByU-rjV z^?mlDB9@b}l=$871lq< zOE>!_DsE+n6-h;-KFhZ5Zo-^jq^bzp^u;P!4bp|kYKxV6U5OItV*HvC)zstYL}o!i z#0wepyfFNKmI|(!USFd;UQCve7eA&*UqwuH>?1U@C%!vSu(4V68>~UMz9r~LEEH^- zg>#N^dE-w&AK(jufWuq`rET>tTg%;Hp1nl6rXwezeZcz9fv`kxcbRpR%}c*s{8LcK zx62J`G|GkDZR)xo&-(a!$e~tI-rqF77)mXavg|T{Kpkn266vkC+t9Y#w)BkPIC=~u z6g|8y4-;iH$&WcBBYDwjKkqId zcgK!@CzSuTBPUsHuN^CC({0~6R?%{}N&bdH@wSc*@%9GPkJh8&?a%SH)ff6LN~0z( z3U$DFbyG;G05#eVcR&fo|Km)hy>GiNi9gzo>DW5E?G$O6)pjfJ;L~JdjU-u9U^W6E z^r(`)}hqhk)QXOB!JBh>2U@-X!9XAJPW)w+T-ExYfLrh&#yPpX6div zyCqW-;^V!Nd|gB;FN0xaT~uS!c&T%oKkox11!kKaNknXRv#2s?O30o;;U!t3fU4Jj z@8Zp~wFd%YO;&kB6zQMhF(!ZT!dX`$m6e0AI$EbTSp)!uY82vxR3ktUIG$sALQ!Hn zXT*N%mMxc?d^scCGM^hHLDfH4KlaI>NaXKv~Hsn zNfy)ytK@0&i`$59WZHO$ZJ=^}lD_21H$VX@wF|mq>5y@!r4l|#-E_&4ZAqQoMf!x0$`)4cf^J(o zq`ds8T}fU1o_i#-C-}tUUQM`sdADOu?4GwehL+B;7?>w1u47;5{VX{P_T%)E?hp#n zL-;sz`?-w%ex;QAa`V@l{o_@AkwAp10R@T*&o()Cd1Fh=1*uX%C)dD#;Bjltgxnh7 zF+2vxk@sdi)~L5+)*#Pd2n$4hjnK&j=jdjtit1BV2oHGYa~u`kdAv2IfQi5MmR#mY z@XZq)#{H?_Bli7xM;X@f*W%{ho_XyKjugvRkAsSfBfAR9FlFi5zi(9~6BeMX8Ps36 zO&k}eiTev}Itx|hUy^!%cAic@wX2)_vWzIhFl{<*GIhqAlDl`ENmHS=~R>>fksz!^r(QcY$HxllDJ5zF^QeUB~VZI=1plx%|)7 z{}e%mG^|iai-K|m3`0rQq}HUY*@=1Uf}w4#t)cDf0+G_SfzbA`{I<2hh}PAMK>aSA z>w=F3F2@5}Snmpd)Q7@>s7qoL#x2{VCvv~y8M$9`$)4w4EG!oO$X0~q@`y$&FJVKW zb}Z3qZ%S@G%DZw!Nc>bf<5Dk?ECFHMrY$1jl0<;tBB zvpJVlNT>dH&x&V8uF_yJ>JJ(sR@T|9MEqkSV+T?FZqVv2Ls2rV^GX&eZ#UP#-Ob~k z)^Vrt&zgmfr{5_S6IPu^5PS>CY2qfQ#rc z;r2dHf6T0Z_wDo;AICTsHyPJK`(SKFK-^5-!koP`MxE+mlw&g-qeW;YuGAmIElD1; z)6E}Gm@yMr^+)Z2#2r2KQQ<{D2`?y5QZ@7GtI{u^UR^=i;0&+c@#%H=`lqOrIxY1x z_%ob$o#RFzZ=mH`X}ovNt&%M}T#-pLiHlq5X&&`p{Itwz=c%-Vhh+~^XFJ>R(>mKm z@?r1)^LGC9=tea391gy3o?Y%7f@CaQqctj zc|+5{;7G1D@+mm@py1;6ad z(XEY%+$y;t#Te7Eq1h2{Ok2apKEDJ=x#IId&=bTrUN7O8Ht1-7geqhENTlSnU12e0 zozVq{qnedP*j>8c{=AY~zfhhUSBaO^YxnGC+*4)*r(fQeHWJG$6&#jk(5U~{KAS_l zetU@Rl8vpbLc;yYG`*@|Oo)Q!jPMSH;zP>BG7vv09ylnz`Vd0+3y+F_TmsI7@wMpB z(g4#zA3{my`9J>q?28Y2wRtf$|N3*{iec`@yZ05%&Xew(>@_4&1E?x!G-9rYUT$<^ zWokk>*tj=$U)$&HSh4t9Oi?5(wo;YoGKDb|c5@?9Lnv`0cCDWNWkz#oNq^_Kp-e2Mngi zsGKD6V=z+Ulfq~i$$CW;qv2sDy;-nTB+m9-;D#Yrqz+_hN&|^Jf>y&3G0*L!&axQ) ziQ3&nHW)J4Hr^H3CR7#hQzOU+q-y7@Lsb<9yDgccN+>pi*S|=TB;_-BQy~eXb(avlPyn)Beymnpu~qeRugrH#ppur(wRe~Ng&D#fceq}Wkj*yORPz2 zU>zPplgNnoVG__w)D{11S21U%FC3b`T4hkwMagi5p;5CIHb0A}tKWB?Q#{28P|1Rb z;SG@Eb%xP00W=?J%MbRtXP++{KW!A8{>W`C{l+{Dh#Q|$XkR8!~FmZZI>G&0wK=%6<3iCU^=d$+#u&bRi2le%#K!4-Z#xiQHV@g? z8mpnZ1Q2LGXlZ>>&-ap@x|Z2dxGaTZnaA&Z`Xr->0*zSF;`#?9FxW;+M>57Gzj^8E zfThJLcMa>7+v|UnS8b38-!2YLnik%(9mD}3_KW=d#=$^%#Jt5{g+8}n|0W2X36Vqo zY36DxsH1!#R@@PXDV`9fF+`R<2Zw1AB3k_UmWwoT{*pe@rt1Zt0nqfWZ{%RfW97ho@Z9#y zk!1^GKU`fNu)obKS#p6|C3S=2-i6d(LHrB+FTocLdi6Ykh;<{QFOmgM{dr(?F^86k z2;6yK|K&w?a{%IBK;-D*Xf}&C_xyVJZ_2lsI`#yyLXr*ha18>|k5MWmJSI8sbIfgs z$l%yqF+svm6m{V%Z>}_Jing_so5rdXNG-dTzj`j>?M@8kKp@jD2eE)d9ZF*tcH|E6 zSHIIL9oeYkNL~FDVM(o?kHBj_8%U*C`}6kfb?wxW@5d09Oqu;IxFR%D?h)D__@?(o z!M)aePlPB$QlThsR^j7kn0h+O@}a(cWocn)8ChznmQr#Vp~X|9RO|+Q66hMDR#ssY z{CW~@!^iqXX(0ZQ zs_Z{`ize|KTq!2lnH6Lb1Yj-r%s9goxPip~R*1=@gvL_>i#3>Hl#W_!+lvxCJE=e_iotanrQ8slKz~>-#0j!oE|n^l5pT-sMgSJ2u7xf|O;$xSlCZT}n_IWKx;{Cc^$@kz0MQDQ zAeOdq^}um){f{aIH8XyGvoF62i-(Ok5K{SE7>HiHh`cN4M|vn6lrUFN)q7~!(LI$@ zm+E8L!=w;^cDf1xqnX#&;h?>2ioZpM=qgi)Xyk+US{w28+dV~USfqxElOgC>ox=1U zQ}=5f3Rfe^y5K3S44*nQJu_`jKQ(P+b32Pi(Hb7M8K5uFL;u3NM3pE=?uPl&>w%QX zS>If~8rl4`%5AuD4@7&@=o;Z4d38Is`@ACTzA3Ja!eO!PFQQ&Bt!~ti$7mcg5dXXI zgW0>d7||IcrQP>!Omxhlq0+L&yD!z7tw}@Fk)3chD*NBrTgJd#N;TR~6}D%wIIg?g9Q4~dMlB=KzY~y@*;!>OhX~3PdLnGRG-A;i zPqx74anEmd|Y!}Fz^HQw~yAOWAw0U<~V4g4IbbuIefT`^j>+$eW0~5-5SOrjY+Zo zHX;~;ESo>#>>tm2q0xmQocnWi+Sj>mOX_ts+a9)+TW9)}v8plariZ!_-ns~v zU#-?#y@Imo(J?moL_>ISnce6!qg6Eqh=k-A$}Sz)1{!a-fHpDBb6QnvTOQ;gawMDb z6xGXkxm>+bNiv%SJZmQ5pkDK`jSU74iNMJ+whEPCEO$X83FWn+Sq?=)V@Zj>4~kck ze=Pfq&bnALem=}!l$l*AT@jstSTFtnSkVaU{_<^f33~#6mhBu9!#_?0=NIVjmE;Td zza&bxhyaAL9iCAmGzY1H@d z{AW%qlM#&AmyITa?E_2w@3p54(Og#lw#roeK))iLb8wZ_zs5me1cGCl^|Z$G-JEvi z{f_KK7%|M~DBV_mX~SrO6897>XFe=+Ib(}8x@f@svd(WpK`%1Aql)A(awEVrgUF=TKDxOFOLc) zQZrJ&V~-&X3ugOKmC^T_-#O=ROlLp5iB!>zk={J3W5eKA6&lvv>?B2W^hvI`_g5#oHhuP75o?mFXwk5keHhBdTP>T;QP z%}!FOCBx`6x^{BQ0P=|6lrVlM)94l8dfB{G@BIA9sWV+e^n34v#Eo{1>Wz_UrD+T4 zG^Qj*m;>T|**p7kQziKMAgmxmLZ4yAV;$Km;=DrOVF?zVw!T+rV4*2lso+<~+F;S5 zP7H@xy{jG2KfsfE$3DrtWS;h;l65248sf=?&JuFQP2WN3_I_q6EH6}%_UTEp+j!uX z(;i^1q5Vz`^g7Sx6!=pgIm!|T(pv=b6R%-K-f0f}AJ55F&N}N6xJBpByA>z2HM*B3 z_x*x5I5WCcE8 zjqCV*=ceV_T70?R65)em_J`YhLmQ6oet}IL<*G_2;cc|w69HbAIyj)%D!Kp;Gmx2A*mZ&or{*|;bc zN*7EOSx22&Nm6_q8={Uu1X6oT(OmfyJS0^0H8xJ zc5s{+h#@;)z6@w#k{~wbA2GZk*y`M5!cZ>I|2uw1fvuF{P8+NTlA#Ji6CcK1>i4m5 zX0*b?3Gs+YA&j~G>htcfB^@>9#D*VWgdga*GK}Gx@#vG$^_kFX5ZsY-D*BLI0Dx2I z^#Nmq{=VwKu3dJYdpe-}ztjD9_bu=(@GbBy@GbBy@GbBy@GbBy@GbBy@GbBy@GbBy z@GbBy@GbBy@GbBy@GbBy@GbBy@GbBy@GbBy@GbBy@GbBy@GbBy@GbBy@GbBy@GbBy z@GbBy@GbBy@c*O0aJ^783;@5`cIwf8F=AcraqlpK+~zVlQe^D0r2Qu^@U6wl+TG!? zVDitl@a|q;hh=#zODe(vDYdL>i(7$6?wRO=IowI;mJF-zb4ZEWi*^4|E5cie$o;2RPNJEJVayk>59-%` z%3KE@XS-G_b=$;h1}-Xe_64a6=tc(Ut4XR!qlTd$ZiXh_Yy3n)`uR@gbTbszO{Had zeP2~vXH*`TSD5p1cAS>+b1+)gE(h~Af{;ppSmxypK2q`EWXt1J4HL;y<>gUuSxwwq zk@fiu9dT;1o73k3gt$@{G=q~n<>j&<6x;qyk;heBIbNEAY zN^R9CL>yL^!zk&7^VhGr7C-me<3Pd3e?D3_T*iUEaO+PkC3q8^#!m?D!6*Dkw)Y+G z9u7LIt|}e*E>0f587I1Id#AQ#w+ndSfDn>m39N$pR&Wyej(k2CXS4_omvA#%MAe}= zw(so6v(MOO;{NdMu5e3zl2BK9OXaT!P`}dm!;av56#ZgdXtj<8?YGOPNV~?01~=`V zOs?N3S~^@9*Hu@zjd^2!oCNVQtmD^4DZ|GX^ePf?L_a@6J|t1OR3Q!%B6 zBs)F(J%?M)TvSmy{gB8@iU>c6KkqwK z4%0e4qF1iRTM+x!7(WX=z4gSEhVevG=KnS?5=+ukHJ<8xV34;9(C+lpV^m0a-+Hb! zJSeTS9ikpF)3g9Dyan@l?Gvb9Z-B2-I6<=gNL+K*u+b+2wKK8>=+0Kgmw)Qh6MwL* zlumk)^HIukkKDhF+E=p{YbP8tS-AzA^;FrJc80suTH<_4>x`_&>gC2K)f334#p*qJ z<5kjV_mDHVd`Z97!66mDKNQ^}!sVwudv5O*cl?Fo#Qn6`x^1d&d@rA5D3t%)g6<(A zcC7xfgp)s@dvfW1 zr!H=}Ra>}804JwMYZFT*oXD}P{}Xjp%a}8&q#dWA>oA8MpF`$3#^}yc?vD=eAM!N` z3~?Vsg7R2Vhzf@!sSO*=qmn=krpsT`#Sft|-ST9t~&b&}TpM2WsxVApUp3_4TZ;P4k7M2y&Ubc#AnR{>4X=_aVY@xA*#Wab|=pz3_f0 z6pV~aaHMtSS<#!L+rRO}Qtn1=Q?c>5>e}tI+VzM{2FdIEP_N@=#P2q8@EO0XWkT zoMgXj99<);9KLdjKl7l6R>M~-8-EYTVe9NJ$yG)AaM_= zG}sOO^t?zZV1n$ShQJ$w1IY~*Ckt=v*f4m&1HGOOin(MT9CAqWdhp;T&Cj7zNpizl5w&TkK_2HjoJ!l(2q? zB!7f)=f~dWXv^GE3+8X*l7TzB;1CzyAKRCZhEsjaDTiFRZ)&!a_Y_L#%EKC0dzHig z@!_WGMs+(IRTCeD=+leApXVLC&(S1+WM`*d$@H*x^YL7$@OQ(%bbkZ6Uj`$OrmoNo zv^lE|tfHhJrrbTN9hHm$vm+=7A@K%2dqgL) zjln*SvgXAnWgTmVIJ8xjc9KVE{c4%?diEn1gd%z_sXY{_(VVbrUnol|L^<|S=&glM3E?oEzrgz?6ML~_t z6hnZ8neC68qOyn4SrbT(C&+eEZ_m_oPU)f|*6TAe+ObIlA^nX?FGpz$PcwRIx!iUT zDX5Sa{{@ZvUW!l>J)t{5K4U_BvHg!7Hgjg2YfN{dC|elvB~CBbsZtRZHrpwhfZRAe z68e4S`Qb`Gd^>ppBWXILrh4d!ksNY+Lx|}Jm|@@_XUf#pB&%LN;PVY49}w&ji3otV zNQZ5WzGv*PTb!et4q8d+X*%+_?Rg(Dp!7Y z>B{Z|GbNmoJKQW$ZwY$(d%b{DQIcSt75IPuoDHOKPVsKJB*bI)y=>sAO~M6ZWR@ne z?#8YAkd1jZ7;M%;u*E65q+>l~{Az&Uj7Af*HS1_uV zjCRIuWQ&iOZ~hP;rV@p=cTX}uoi`vTx~)u9{as=Y84ET!;u%c;cgmeOu!4m>`+&i% zrB}Qis$}k!l~F-ghl)H%d|PNk#-|F4D>btlU#rz(DyL9ULqaH`VpdU0ng_6kj<$Zp&+Un>ea!6`=ZD!?XRpfbx3p2&FCakB2 zzgM;y6C5>BRjF2$>z+xYioi!wl-zy)n+JSyfZnG2_>46~=*X1WoRhZ*^udWS*+F&@ zE>U4U5(Yr;2FGy~Mlr#5SK>no(7!#k4vBRO8FYNLg8Ed6t3#}CPKGtctZVvUC>l=} zt25hpdF|NLx6BO{STU3dbP}gIS+>ssDf6h-^(tLwMS9?hP-zk|k=7I~Bw23?&O6CY z0R=TLXI^7l@6G1Ar(>&tx9TmQxbzB0Eo_Vmghu|2;w_O85oI?6H6WUr;h=YM&G6*q z&P|D*fF=K2q=uS|A@b9B4w4sr>{pM!;)m}$Hlc53tc3F%2bb;gIpoAyeZ8)H_c|bGuFi z?7A%pMy8J-Lv9?mNg?eE77FGhH=&^O`e$iO6H%fzD^&p%tV_&U^IEh=TB_teer#3{ zrD6v1fx%?a?F;u9Q)eeBF}<2^sYd}o8S<*27}h-?5_u%hX2-TgPB zs<^rYIGj<+HV{-N3}%mB2}G$8Ex7@i$75kZY|wo(XAE&AZhvZ-CS-wti;bE9yWXZ5 z0j9doE6wh*bNVzXYDwym0x-=mT6=N;JZPA*GWm%_yQOM;@-%}rgzGfPJTTo9JIlaE zD3x0fOu6m4f;tk_+U&RN22s?3zF6>cmDH1PA;Jr0bjQh5@cEpRkteb@`RhVwJm!66 zC7cv*E{Qlop>B-w!m4HGyo}p#+m-F#D%iK8TK>B8Y&;dhLtVHkVb%DW)%>?$cvn|b zkxO0Or#YNjr!xY$jm+;U`;F{pm^dl*Sx5Wb_S1GbNooQuv|mgI*Jiln#}Qmh!MM)N z4Lt~tXA|QuzO_llko1C$9=A=37S`{BI3u02b3RAsG- z6WHn>Q;bUrhor)Ig~#3Gs-YoS#$A5V0#WM5_NV1$iGR-ItizaiNV0IFteL>xYY+C< zPHojUI;`S2+?>?)wz3P97dJ3>i3YrZFNxTCy?I>g5TTG1qt{)(H_&mnpUWwA%b(qw z@0bo{Hs}pe%Wa}c*FG)=g{(lfemG!mtel52t${ZmQ^czzdU2X$7P)4vy`0b}J*KYr z9hqP;gXPvR`B^%aMr?uFPDQxOwTR;W{qYa3P~s!7T5lFr6;qm(>IWX)4ZJy}cY9O| z=OkjP0pWu_w3>>Sr<2ZKZ+0r!Z9pkK=`sNCpn=3`@sp*GO<4XAJ7X~1zMS7P#XnLT zxSQ6-H0MchLZdHcn+D~o@iE|T9{!+Pjp~YZ6 z6aMi&Ht7gGfilUlo{qbf7*!Si9PQ9}1Tqm%{_bBK7ARJBOzcTW;)R3i<|If4hFgb) z%(W(mdqc3F9MuQYCDw1+n@!Clfx*9Z?)neug8J#el@9t|z1xyEN+Ngp={sXBe@w-w z4q`P&s+;^)6HA)k;6q+TP&aSbcut&6(~)iNuU1)DCitU7>&cLlg64up+zL^@A^BqG zjk%&Y*s24asD{jLmCSERSGI)gVpn@6`5GE7iT?IjZw zmrG8x1CRDm0`+KF{1@cH6Q@$=)gcqLLObpbR`K-$1raqt*R z^W|p|@OLIuhwOA0Ug5sP>44sWfz|1LFi7llDE3FBxQe*jmtPfsSr?%WR?83lL$F=i z*gK=7JxE397F0}F^d@HVa&P~o!q;1r`wRWS>MCSVJa13V!xrHs2f-d9LAT)nuLpvy zI?(K+!pCtE?Z60x@iM=5NT9ZnU=IgakWk_4k3F#d=+-Zl%ty__xqmOBWd2z3TkisM9eLR9_NaBo!V&7bfHlS^dECyK(xGU1p3%FBl#VDdySB?~i zgf%VdW$Y}@L`Z{M%q_4mmiLUlbg?F$D{JY##?V1jePM;4nlJ)3?m`{9=Vx5@V+__$ z?=-fG4*q)4;7u8G>6Sa=`S*y z%8`^YHkc}*YzG}g@i`DL(n>Gw{It{&;AE*+Ohh0gSPhkX7>rS|HdcK^+KpV@e4oc6@bPO@br%?#O(x3Xx>* zoL7U5nGX|CGAiSVHeB7!9Kqv(N=(ON3AD0>yAAeRw{VZB!mNnI{7^m&B@s}^Uc*X) zK1vtA?BXegkLW9WOp?pD`ZN{gU_=&yjB8A(Ou37cvgR-D}9RiJttojr=tB%x-fhXABt4)}kcUIXQ86GL?sjbMPN|GW{g8dKf z8la934Gz%I8kRhuIGlj#$R0~!I>Ut^n8FoNh4u|m$L2rbh6cZWOzAGw2*ZBXhT`3{ zNn>(_P;fDX-&j^s^y8}3DD-YYl$NVjOGcYVN2p+ziFRt@EVYkfiCMIjDupyCs%)AZ zfFSWKDc=3HP!LweZ~^mWZ?%F}bHGe%4G0BCSu6++OAM=L7AZD%cfxIzQY#Toq!DAC zPoBf7tyMz^;c(MEW-*{DR30i_tB#{r*LThh?A^c!|}RUaCYSSiVziJ0gqa8s1WVT;5`=v|mUR7K_1n6c=1d zmA&NYnoTV7YjYiiVPIs#4v5#~!fBLI%!YBJYY`in`#(tNgxWZNK?&ji9;oW@by>C{ z)`@CH2DAbpAVyW#tb~)#yuX3WMU&Jrx23lRBgh0OB|NJ}vXG^URFnCOFG-@+FSIGsLDoggp-lC zaslNBs$vw5{i-(TI(^+}N;(LS73FFOr72|<8L&%B3bh%QYi(jQk5!yYk8C~LM6~LA z_fCpjeko4Jh9);YYhYe6ImfJJH7OMpi**xqjjKHc6&;o06YrOdd~9o(Q(sBSxr4*6 zC1)AAtqD#*;{t500i3wh6usH#pj@QT?a9Ln17%K=?4j%wh4}Ipz|X^-6R-0fN>?WA zqT}^uGg8f_NKlQQFs+{ix}CZ5Gg@Ys3*CvQ4m)$K&t_MH_-zB-fv3JZ+s-X^X6;)o zY*U&QKD$qwF&mEKN0x7xprH1G-eB|_wFQ=op=CNCx!tNpa(ed$#Dlm9mv`gjgX&jr ksXq-|3S&9so~-~#TZOq7b^H24>LQQVXcLg@gRNly3p_2XDF6Tf diff --git a/frontend/scripts/check-font-integrity.mjs b/frontend/scripts/check-font-integrity.mjs index f297a3a0..c21c3a59 100644 --- a/frontend/scripts/check-font-integrity.mjs +++ b/frontend/scripts/check-font-integrity.mjs @@ -9,6 +9,7 @@ const FRONTEND = join(dirname(fileURLToPath(import.meta.url)), '..'); const FONT_DIR = join(FRONTEND, 'public', 'fonts'); const FONT_STYLES = join(FRONTEND, 'src', 'styles', 'base', '_fonts.scss'); const FONTS = [ + ['ibm-plex-sans-400.woff2', 400], ['ibm-plex-sans-500.woff2', 500], ['ibm-plex-sans-600.woff2', 600], ['ibm-plex-sans-700.woff2', 700], @@ -34,4 +35,4 @@ for (const [filename, weight] of FONTS) { } } -console.log('✓ font integrity: IBM Plex Sans 500/600/700 are valid WOFF2 assets'); +console.log('✓ font integrity: IBM Plex Sans 400/500/600/700 are valid WOFF2 assets'); From a3c243c952a246e99ed7ccd90b5f03467dfca0c0 Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Tue, 3 Nov 2026 12:59:09 -0500 Subject: [PATCH 072/171] fix(ui): Recipes page gutter, lede in info tip, readable active filter chip --- frontend/src/i18n/locales/en.json | 1 + frontend/src/pages/Recipes.jsx | 14 ++++++--- frontend/src/styles/pages/_recipes.scss | 41 ++++++++++++++----------- 3 files changed, 33 insertions(+), 23 deletions(-) diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index e369fe45..deba9002 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -4804,6 +4804,7 @@ "cpu": "CPU", "disk": "Disk", "featured": "Featured", + "headerLine": "One-click installers", "install": "Install", "lede": "Ready-to-go installers that run as real operations: probe, derive, apply, verify. Secrets are asked for mid-run and kept in the vault.", "loadFailed": "Couldn't load the recipe catalog.", diff --git a/frontend/src/pages/Recipes.jsx b/frontend/src/pages/Recipes.jsx index af5448b7..2c574090 100644 --- a/frontend/src/pages/Recipes.jsx +++ b/frontend/src/pages/Recipes.jsx @@ -9,6 +9,7 @@ import { import { Drawer } from '../components/ds'; import EmptyState from '../components/EmptyState'; +import SectionIntro from '../components/SectionIntro'; import FormField from '../components/FormField'; import { runRecipe, useRecipeCatalog } from '../hooks/useRecipeCatalog'; import { useToast } from '../contexts/useToast.js'; @@ -143,11 +144,14 @@ export default function Recipes() { }; return ( -
    +
    + } + info={t('app.recipes.lede', 'Ready-to-go installers that run as real operations: probe, derive, apply, verify. Secrets are asked for mid-run and kept in the vault.')} + > + {t('app.recipes.headerLine', 'One-click installers')} +
    -

    - {t('app.recipes.lede', 'Ready-to-go installers that run as real operations: probe, derive, apply, verify. Secrets are asked for mid-run and kept in the vault.')} -