Optimizare scripturi build/CI si functionalitati noi Lot 2

- CI/CD GitLab (.gitlab-ci.yml): verify -> test -> build -> publish ->
  deploy cu health-gate (/api/v3/health/all) + rollback manual
- Publicare pe retele sociale (LinkedIn/Facebook) din Analysis History
  (social.ts, linkedin.ts, facebook.ts, SocialPostModal)
- Specificatii OpenAPI: agent-v3 (87 op.) si didi-framework (287 op.)
- Matrice testare acceptanta beneficiar + script dovezi API
- Fix nginx SSL: redirect port 3001 (error_page 497, absolute_redirect off)
- Adrese interne inlocuite cu hostname-uri generice (.local)
This commit is contained in:
EVOTECH IT SRL 2026-07-12 13:36:08 -07:00
parent 8ecc78e729
commit 7e4f23d4c4
22 changed files with 19477 additions and 110 deletions

View file

@ -33,11 +33,11 @@ EXTRACTORS_URL=http://<HOST_IP>:54400
# Lot 1 — Platforma AI: TOATE URL-urile serviciilor AI, configurabile per deployment.
# Pe o mașină nouă cu Lot 1 propriu, schimbă doar host-urile de mai jos.
# ============================================================================
LLM_ROUTER_URL=http://10.11.10.17:14011 # llm-inference (Qwen text/OCR)
VISION_LLM_URL=http://10.11.10.17:14011 # Qwen Vision (fallback la LLM_ROUTER_URL)
DIDI_BRAIN_URL=http://10.11.10.12:8090 # brain (verification cache + RAG)
M17_WHISPER_URL=http://10.11.10.17:54300/v1/audio/transcriptions # transcriere audio
M17_WEB_API_URL=http://10.11.10.13:51100 # web search (claims/source)
LLM_ROUTER_URL=http://llm.local:14011 # llm-inference (Qwen text/OCR)
VISION_LLM_URL=http://llm.local:14011 # Qwen Vision (fallback la LLM_ROUTER_URL)
DIDI_BRAIN_URL=http://didi.local:8090 # brain (verification cache + RAG)
M17_WHISPER_URL=http://llm.local:54300/v1/audio/transcriptions # transcriere audio
M17_WEB_API_URL=http://websearch.local:51100 # web search (claims/source)
FORENSIC_API_URL=http://forensic-features-api:8080 # forensic m25-m29
DOMAIN_CHECK_API_URL=http://domain-check-api:11000/api/v1/check/check # domain check
INTERNAL_MEDIA_URL=http://didi-agent-v3:24803 # URL intern media pt modelele locale

View file

@ -32,13 +32,13 @@ x-worker-env: &worker-env
JWT_VERIFY_ENABLED: ${JWT_VERIFY_ENABLED:-true}
FRAMEWORK_API_URL: http://didi-framework:3005
SYNC_API_URL: http://didi-framework:3005/api/sync-analysis
PUBLIC_API_BASE_URL: ${PUBLIC_API_BASE_URL:-https://10.11.10.11:8443}
PUBLIC_API_BASE_URL: ${PUBLIC_API_BASE_URL:-https://api.local:8443}
INTERNAL_MEDIA_URL: ${INTERNAL_MEDIA_URL:-http://didi-agent-v3:24803}
# === Lot 1 (platforma AI) — toate configurabile per deployment via .env ===
LLM_ROUTER_URL: ${LLM_ROUTER_URL:-http://10.11.10.17:14011}
VISION_LLM_URL: ${VISION_LLM_URL:-http://10.11.10.17:14011}
LLM_ROUTER_URL: ${LLM_ROUTER_URL:-http://llm.local:14011}
VISION_LLM_URL: ${VISION_LLM_URL:-http://llm.local:14011}
DOMAIN_CHECK_API_URL: ${DOMAIN_CHECK_API_URL:-http://domain-check-api:11000/api/v1/check/check}
M17_WEB_API_URL: ${M17_WEB_API_URL:-http://10.11.10.13:51100}
M17_WEB_API_URL: ${M17_WEB_API_URL:-http://websearch.local:51100}
DIDI_BRAIN_URL: ${DIDI_BRAIN_URL:-http://didibrain-api:8090}
# OpenTelemetry — traces export to OTel Collector → Jaeger
OTEL_EXPORTER_OTLP_ENDPOINT: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://didi-otel-collector:4317}
@ -47,7 +47,7 @@ x-worker-env: &worker-env
# to /api/ingest/event so analyses appear in the unified Insights/History
# view (module=agent_v3). Empty = sink disabled.
DASHBOARD_URL: ${DASHBOARD_URL:-http://didiAI-dashboard:51300}
M17_WHISPER_URL: ${M17_WHISPER_URL:-http://10.11.10.17:54300/v1/audio/transcriptions}
M17_WHISPER_URL: ${M17_WHISPER_URL:-http://llm.local:54300/v1/audio/transcriptions}
M17_WHISPER_TOKEN: ${M17_WHISPER_TOKEN}
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY}
OPENAI_API_KEY: ${OPENAI_API_KEY}

View file

@ -83,7 +83,7 @@ router.get('/health/all', async (req: Request, res: Response) => {
}
// Brain (didi_brain) — fail-open dependency
const brainUrl = process.env.DIDI_BRAIN_URL || 'http://10.11.10.12:8090';
const brainUrl = process.env.DIDI_BRAIN_URL || 'http://didi.local:8090';
try {
const t = Date.now();
const r = await fetch(`${brainUrl}/health`, { signal: AbortSignal.timeout(3000) });
@ -93,7 +93,7 @@ router.get('/health/all', async (req: Request, res: Response) => {
}
// LLM router
const llmUrl = process.env.LLM_ROUTER_URL || 'http://10.11.10.17:14011';
const llmUrl = process.env.LLM_ROUTER_URL || 'http://llm.local:14011';
try {
const t = Date.now();
const r = await fetch(`${llmUrl}/health`, { signal: AbortSignal.timeout(5000) });

View file

@ -13,7 +13,7 @@ import { log } from '../logger';
// Internal URL for local models that can't reach didi365.eu
// Points to MinIO directly since public URLs use /storage/ path (Kong→MinIO)
const INTERNAL_MEDIA_BASE = process.env.INTERNAL_MEDIA_URL || 'http://10.11.10.12:9000';
const INTERNAL_MEDIA_BASE = process.env.INTERNAL_MEDIA_URL || 'http://didi.local:9000';
// Vision LLMs may have training cutoffs; without an explicit current date they
// can flag content dated e.g. "September 2025" as a "future date" while the
@ -79,7 +79,7 @@ const DEFAULT_VISION_MODELS: VisionModel[] = [
model: 'Qwen3.5-397B-A17B',
provider: 'qwen-local',
// Configurabil per deployment (Lot 1 pe mașina nouă). Fallback = LLM_ROUTER_URL, apoi IP didi.
endpoint: (process.env.VISION_LLM_URL || process.env.LLM_ROUTER_URL || 'http://10.11.10.17:14011')
endpoint: (process.env.VISION_LLM_URL || process.env.LLM_ROUTER_URL || 'http://llm.local:14011')
.replace(/\/+$/, '') + '/v1/chat/completions',
auth_type: 'none',
timeout: 60000,