mirror of
https://github.com/proffesor-for-testing/agentic-qe.git
synced 2026-09-19 08:45:47 +08:00
dc10361133
Performance fixes: - HNSW Array.splice → BinaryHeap for O(log n) insertion (25x speedup) - vectorSearch N+1 → batch SQL query with IN clause - loadPatterns N+1 → batched concurrent Promise.all (50/batch) - Math.min(...spread) → iterative loop to prevent stack overflow at >10K vertices - Move @faker-js/faker to devDependencies (-5.2MB production) Security fixes: - SQL table name allowlist for defense-in-depth (SQLite can't parameterize identifiers) - Object.assign() → safeAssignPooled() to prevent prototype pollution (3 locations) - OAuth timingSafeCompare pads strings instead of early-return on length mismatch - OAuth no longer stores raw tokens (hash-only storage) - OAuth revokedTokens Set→Map with timestamps for 24hr expiry cleanup - Remove hardcoded GCP credentials from sync/interfaces.ts defaults - Add .env.example GCP section with placeholder comments Testing: - Add 167 tests for 5 MCP security boundary validators (command, path-traversal, input-sanitizer, crypto, regex-safety) - Include QE swarm analysis reports for v3.6.3 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
179 lines
4.4 KiB
Bash
179 lines
4.4 KiB
Bash
# Agentic QE Fleet Environment Configuration
|
|
# Copy this file to .env and fill in your values
|
|
|
|
# ============================================
|
|
# LLM PROVIDER CONFIGURATION (Phase 2)
|
|
# ============================================
|
|
|
|
# Primary LLM Provider API Keys
|
|
ANTHROPIC_API_KEY=sk-ant-api03-your-key-here
|
|
OPENROUTER_API_KEY=sk-or-v1-your-key-here
|
|
|
|
# Optional: Additional LLM Providers
|
|
# GROQ_API_KEY=gsk_your-key-here
|
|
# OPENAI_API_KEY=sk-proj-your-key-here
|
|
# GOOGLE_API_KEY=AIzaSy-your-key-here
|
|
|
|
# LLM Provider Selection
|
|
# LLM_PROVIDER: auto, anthropic, openrouter, groq, ruvllm
|
|
# LLM_MODE: hybrid (uses HybridRouter), cloud-only, local-only
|
|
LLM_PROVIDER=auto
|
|
LLM_MODE=hybrid
|
|
|
|
# ============================================
|
|
# RUVECTOR SELF-LEARNING
|
|
# Enables intelligent caching and pattern learning
|
|
# ============================================
|
|
|
|
# Enable RuVector integration (true/false)
|
|
AQE_RUVECTOR_ENABLED=true
|
|
|
|
# RuVector service URL (for HTTP API)
|
|
AQE_RUVECTOR_URL=http://localhost:8080
|
|
|
|
# RuVector PostgreSQL connection (for vector storage)
|
|
RUVECTOR_HOST=localhost
|
|
RUVECTOR_PORT=5432
|
|
RUVECTOR_DATABASE=ruvector_db
|
|
RUVECTOR_USER=ruvector
|
|
RUVECTOR_PASSWORD=ruvector
|
|
|
|
# ============================================
|
|
# PATTERN STORE (Self-Learning Patterns)
|
|
# Stores and retrieves QE patterns for learning
|
|
# ============================================
|
|
|
|
AQE_PATTERN_STORE_ENABLED=true
|
|
AQE_PATTERN_DUAL_WRITE=true
|
|
AQE_PATTERN_STORE_PATH=./data/qe-patterns.ruvector
|
|
AQE_PATTERN_AUTO_SYNC=true
|
|
|
|
# ============================================
|
|
# CODE INTELLIGENCE
|
|
# Knowledge graph and semantic code search
|
|
# ============================================
|
|
|
|
# Ollama for local embeddings
|
|
OLLAMA_URL=http://localhost:11434
|
|
|
|
# PostgreSQL for knowledge graph (can share with RuVector)
|
|
PGHOST=localhost
|
|
PGPORT=5432
|
|
PGDATABASE=ruvector_db
|
|
PGUSER=ruvector
|
|
PGPASSWORD=ruvector
|
|
|
|
# ============================================
|
|
# N8N WORKFLOW INTEGRATION
|
|
# For n8n workflow testing agents
|
|
# ============================================
|
|
|
|
# N8N_API_KEY=your-n8n-api-key
|
|
# N8N_BASE_URL=https://your-instance.app.n8n.cloud/
|
|
|
|
# ============================================
|
|
# AQE FLEET CONFIGURATION
|
|
# ============================================
|
|
|
|
# Fleet identification
|
|
FLEET_ID=agentic-qe-fleet
|
|
FLEET_NAME="Autonomous Quality Engineering Fleet"
|
|
|
|
# Agent limits
|
|
AQE_MAX_AGENTS=10
|
|
MAX_AGENTS=20
|
|
|
|
# Provider preference for agents
|
|
AQE_DEFAULT_PROVIDER=claude
|
|
|
|
# Timing configuration
|
|
HEARTBEAT_INTERVAL=30000
|
|
TASK_TIMEOUT=600000
|
|
|
|
# Agent pool sizing
|
|
TEST_EXECUTOR_COUNT=3
|
|
QUALITY_ANALYZER_COUNT=2
|
|
PERFORMANCE_TESTER_COUNT=1
|
|
|
|
# ============================================
|
|
# STORAGE CONFIGURATION
|
|
# ============================================
|
|
|
|
# AQE data paths
|
|
AQE_MEMORY_PATH=.aqe/memory
|
|
AQE_LOG_PATH=.aqe/logs
|
|
|
|
# Fleet database (SQLite for simple setup)
|
|
DB_TYPE=sqlite
|
|
DB_FILENAME=./data/fleet.db
|
|
|
|
# For PostgreSQL (production recommended):
|
|
# DB_TYPE=postgres
|
|
# DB_HOST=localhost
|
|
# DB_PORT=5432
|
|
# DB_NAME=agentic_qe
|
|
# DB_USER=username
|
|
# DB_PASSWORD=password
|
|
|
|
# ============================================
|
|
# LOGGING CONFIGURATION
|
|
# ============================================
|
|
|
|
# Log level: error, warn, info, debug
|
|
LOG_LEVEL=info
|
|
AQE_LOG_LEVEL=info
|
|
|
|
# Log format: json, text
|
|
LOG_FORMAT=json
|
|
|
|
# Log outputs: console, file (comma-separated)
|
|
LOG_OUTPUTS=console,file
|
|
|
|
# ============================================
|
|
# API SERVER CONFIGURATION
|
|
# ============================================
|
|
|
|
API_PORT=3000
|
|
API_HOST=0.0.0.0
|
|
API_CORS=true
|
|
|
|
# Rate limiting
|
|
RATE_LIMIT_WINDOW=900000
|
|
RATE_LIMIT_MAX=100
|
|
|
|
# ============================================
|
|
# SECURITY CONFIGURATION
|
|
# ============================================
|
|
|
|
# Generate secure values for production!
|
|
# API_KEY=your-secure-api-key
|
|
# JWT_SECRET=your-secure-jwt-secret
|
|
|
|
ENCRYPTION_ALGORITHM=aes-256-gcm
|
|
ENCRYPTION_KEY_LENGTH=32
|
|
|
|
# ============================================
|
|
# GCP CLOUD SYNC CONFIGURATION
|
|
# Required for v3 cloud sync features
|
|
# ============================================
|
|
|
|
# GCP_PROJECT=your-gcp-project-id
|
|
# GCP_ZONE=us-central1-a
|
|
# GCP_INSTANCE=your-postgres-instance
|
|
# GCP_DATABASE=aqe_learning
|
|
# GCP_USER=your-db-user
|
|
# GCP_TUNNEL_PORT=15432
|
|
|
|
# ============================================
|
|
# DEVELOPMENT & DEBUGGING
|
|
# ============================================
|
|
|
|
# Set to development for verbose output
|
|
NODE_ENV=development
|
|
|
|
# Enable debug mode (true/false)
|
|
# DEBUG=true
|
|
|
|
# Configuration file override (optional)
|
|
# CONFIG_FILE=./config/fleet.yaml
|