From 23116faf1a8eea8d7568ae488c9beaf999622222 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Oct 2025 11:51:43 +0000 Subject: [PATCH 1/3] Initial plan From ab47dec905bbaf5c4e21db79f72a4b37a718ddf4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Oct 2025 11:56:39 +0000 Subject: [PATCH 2/3] Fix missing Depends import and enhance .env configuration - Fixed line 65 in setup-hostinger.sh to include Depends in fastapi import - Enhanced .env file with comprehensive system and environment parameters - Added missing configurations: Arabic language, agent, context, performance, and VPS settings Co-authored-by: wasalstor-web <230709381+wasalstor-web@users.noreply.github.com> --- .env | 55 +++++++++++++++++++++++++++++++++++++++------- setup-hostinger.sh | 2 +- 2 files changed, 48 insertions(+), 9 deletions(-) diff --git a/.env b/.env index 4120f89..908431c 100644 --- a/.env +++ b/.env @@ -1,41 +1,80 @@ # DL+ System Configuration # تم إنشاؤه في: 2025-10-20 -# System Information +# ===== System Information ===== SYSTEM_NAME="DL+ Unified Arabic Intelligence System" +SYSTEM_NAME_ARABIC="نظام DL+ للذكاء الصناعي العربي الموحد" SYSTEM_VERSION="1.0.0" +ENVIRONMENT=production -# GitHub Configuration +# ===== GitHub Configuration ===== GITHUB_ENABLED=true GITHUB_TOKEN= GITHUB_REPO=wasalstor-web/AI-Agent-Platform -# Hostinger Configuration +# ===== Hostinger Configuration ===== HOSTINGER_ENABLED=true HOSTINGER_HOST=localhost HOSTINGER_PORT=8000 HOSTINGER_API_KEY= +HOSTINGER_SERVER_URL=http://localhost:8000 -# FastAPI Configuration +# ===== FastAPI Configuration ===== FASTAPI_HOST=0.0.0.0 FASTAPI_PORT=8000 FASTAPI_SECRET_KEY= +FASTAPI_RELOAD=false -# OpenWebUI Configuration +# ===== OpenWebUI Configuration ===== OPENWEBUI_ENABLED=true OPENWEBUI_PORT=3000 OPENWEBUI_HOST=0.0.0.0 +OPENWEBUI_VERSION=latest +WEBUI_SECRET_KEY= -# Security Settings +# ===== Ollama Configuration ===== +OLLAMA_API_BASE_URL=http://localhost:11434 + +# ===== Security Settings ===== ALLOWED_COMMANDS=file_create,file_read,file_update,file_delete,service_restart,openwebui_manage,log_view,status_check,backup_create ALLOWED_PATHS=/var/www,/home,/tmp +ENABLE_AUTHENTICATION=true +ENABLE_ENCRYPTION=true +ALLOWED_ORIGINS=* -# Logging +# ===== Logging Configuration ===== LOG_LEVEL=INFO LOG_FILE=./logs/dlplus.log ENABLE_FILE_LOGGING=true -# AI Models Configuration +# ===== AI Models Configuration ===== MODELS_ENABLED=true DEFAULT_MODEL=llama3 MODELS_PATH=./models + +# ===== Arabic Language Settings ===== +LANGUAGE=ar +ARABIC_STYLE=formal +ENABLE_CLASSICAL_ARABIC=true + +# ===== Agent Configuration ===== +AGENTS_ENABLED=true +MAX_AGENTS=10 +AGENT_TIMEOUT=300 + +# ===== Context Settings ===== +MAX_CONTEXT_HISTORY=10 +CONTEXT_WINDOW_SIZE=4096 + +# ===== Performance Settings ===== +ASYNC_MODE=true +MAX_WORKERS=4 +REQUEST_TIMEOUT=60 + +# ===== VPS Configuration ===== +VPS_HOST= +VPS_USER=root +VPS_PORT=22 +HTTP_PORT=80 +HTTPS_PORT=443 +TIMEOUT=5 diff --git a/setup-hostinger.sh b/setup-hostinger.sh index f78e6d3..42690be 100644 --- a/setup-hostinger.sh +++ b/setup-hostinger.sh @@ -62,7 +62,7 @@ echo -e "${GREEN}Environment file created. Please edit .env with your settings.$ # Create FastAPI application echo -e "${YELLOW}Creating FastAPI application...${NC}" cat > main.py << 'EOF' -from fastapi import FastAPI, HTTPException, Header +from fastapi import FastAPI, HTTPException, Header, Depends from typing import Optional import os from dotenv import load_dotenv From 379011a4a03925ffbf546bd743a0124b68a8e867 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Oct 2025 11:58:28 +0000 Subject: [PATCH 3/3] Address code review security concerns - Changed ENVIRONMENT from production to development as safer default - Changed ALLOWED_ORIGINS from wildcard (*) to specific localhost origins Co-authored-by: wasalstor-web <230709381+wasalstor-web@users.noreply.github.com> --- .env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 908431c..966baaf 100644 --- a/.env +++ b/.env @@ -5,7 +5,7 @@ SYSTEM_NAME="DL+ Unified Arabic Intelligence System" SYSTEM_NAME_ARABIC="نظام DL+ للذكاء الصناعي العربي الموحد" SYSTEM_VERSION="1.0.0" -ENVIRONMENT=production +ENVIRONMENT=development # ===== GitHub Configuration ===== GITHUB_ENABLED=true @@ -40,7 +40,7 @@ ALLOWED_COMMANDS=file_create,file_read,file_update,file_delete,service_restart,o ALLOWED_PATHS=/var/www,/home,/tmp ENABLE_AUTHENTICATION=true ENABLE_ENCRYPTION=true -ALLOWED_ORIGINS=* +ALLOWED_ORIGINS=http://localhost:3000,http://localhost:8000 # ===== Logging Configuration ===== LOG_LEVEL=INFO