v1.7.0: refactor max_bot to flat structure, add VCF+UserModel+NLP history context, portal pages and proxy fixes

- Refactored max_bot from nested packages to flat module structure
- Q2: Extended BotUser model (patronymic, email, org, address, vcf_raw, contact_hash, phone_verified, email_verified, last_interaction, total_conversations, total_tickets)
- Q2: VCF parser (FN, N, TEL, EMAIL, ORG, ADR), upsert on re-contact, NLP history context (_get_user_history_context -> YandexGPT)
- Q1: Broadcast preview modal with 10s confirmation timer
- Q3: CSS var(--white)->var(--bg-card), var(--text)->var(--text-primary)
- Q4: bot_settings showNotification(), editable max_bot_id
- Q5: Webhook secret passthrough via X-Max-Bot-Api-Secret
- Masking sensitive keys, dialog_cleared handler, migrate via _add_column_if_not_exists()
- Rate limit (asyncio.sleep 0.5 per 10), dead code removed, conv.intent context in contact.py
- Portal pages: bot_consent, bot_kb (edit), bot_settings, bot_test, bot_tickets, portal_settings
- Tests: 21/21 passing, added test_yandex_gpt.py, test_email_sender.py
- Deploy: deploy_full.sh, schema.sql, seed_knowledge_base.sql
This commit is contained in:
2026-05-29 02:30:30 +03:00
parent 493e0b37a1
commit 72b6879f4b
234 changed files with 26768 additions and 6240 deletions
+23
View File
@@ -0,0 +1,23 @@
FROM php:8.1-fpm
RUN apt-get update && apt-get install -y --no-install-recommends \
libpq-dev \
libzip-dev \
unzip \
git \
&& docker-php-ext-install pdo pdo_pgsql pgsql zip \
&& rm -rf /var/lib/apt/lists/*
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
WORKDIR /var/www/html
COPY src/ /var/www/html/
RUN mkdir -p /var/www/html/service/permissions && chmod 777 /var/www/html/service/permissions
RUN if [ -f composer.json ]; then composer install --no-dev --no-interaction 2>/dev/null || true; fi
EXPOSE 9000
CMD ["php-fpm"]
+28
View File
@@ -0,0 +1,28 @@
services:
nginx:
image: nginx:alpine
container_name: aegisone-php-nginx
network_mode: host
volumes:
- ./src:/var/www/html:ro
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- php
restart: unless-stopped
php:
build:
context: .
network: host
container_name: aegisone-php-fpm
network_mode: host
volumes:
- ./src:/var/www/html
environment:
DB_TYPE: pgsql
DB_HOST: localhost
DB_PORT: "5432"
DB_NAME: aegisone
DB_USER: aegisone
DB_PASS: aegisone_pass
restart: unless-stopped
+29
View File
@@ -0,0 +1,29 @@
server {
listen 8080;
server_name localhost;
root /var/www/html;
index index.php index.html;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_param PHP_VALUE "upload_max_filesize = 50M \n post_max_size = 50M";
}
location ~ /\.ht {
deny all;
}
location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|webp|woff|woff2|ttf|eot)$ {
expires 30d;
add_header Cache-Control "public, immutable";
}
}