# AidaIDE v5.6 Dependencies
# Install with: pip install -r requirements.txt
#
# Cross-platform support for Windows and Linux

# =============================================================================
# CORE DEPENDENCIES
# =============================================================================

# Core SSH/SFTP functionality
paramiko>=2.12.0,<4.0.0

# VT100/xterm terminal emulation
pyte>=0.8.1,<1.0.0

# Encryption for credential vault
cryptography>=41.0.0,<50.0.0

# HTTP client for Cloud Portal enrollment + tunnel (cloudportal/client/)
httpx>=0.25,<1.0

# Password hashing
bcrypt>=4.0.0,<6.0.0

# Web interface
flask>=2.3.0,<4.0.0
flask-socketio>=5.3.0,<6.0.0

# Async support for Flask-SocketIO
eventlet>=0.33.0,<1.0.0

# Environment variable management
python-dotenv>=1.0.0,<2.0.0

# =============================================================================
# CROSS-PLATFORM / TERMINAL SUPPORT
# =============================================================================

# Cross-platform terminal handling
pyreadline3>=3.4.0,<4.0.0; sys_platform == "win32"  # Windows readline support

# PTY support for terminal emulation
pywinpty>=2.0.0,<3.0.0; sys_platform == "win32"  # Windows pseudo-terminal

# Process management (cross-platform)
psutil>=5.9.0,<8.0.0

# =============================================================================
# AI AGENT FEATURES
# =============================================================================

# Anthropic Claude API (for agent features)
anthropic>=0.18.0,<1.0.0

# HTTP requests
requests>=2.28.0,<3.0.0

# =============================================================================
# OPTIONAL DEPENDENCIES
# =============================================================================

# For serial/UART communication (IoT devices)
# pyserial>=3.5,<4.0.0

# For Bluetooth support
# bleak>=0.21.0,<1.0.0

# For Fleet Map geographic visualization
# tkintermapview>=1.29,<2.0.0

# For Fleet Map web-based fallback (generates HTML maps)
# folium>=0.14.0,<1.0.0

# For Camera Feed widget (image display in Tkinter)
Pillow>=10.0.0,<12.0.0
# System tray keep-alive for Cloud Portal + Remote Desktop (close-to-tray / --tray)
pystray>=0.19.0,<1.0.0

# For Camera Feed RTSP streams (optional, MJPEG works without it)
# opencv-python>=4.8.0,<5.0.0

# =============================================================================
# INNOVATION FEATURES (v1.04)
# =============================================================================

# For Dashboard Builder charts and Power Profiler graphs
matplotlib>=3.8.0,<4.0.0
# numpy is matplotlib's transitive dep and the ONLY numpy in the frozen
# bundle. Keep it < 2.0. numpy 2.x ships numpy._core AND a numpy.core
# compat shim over the same _multiarray_umath binary; PyInstaller can
# freeze that so the C extension initializes twice ->
# "RuntimeError: CPU dispatcher tracer already initialized", which
# crashed Network Diagnostics via matplotlib in the packaged build.
# 1.26.x has no _core/core split and matplotlib 3.8 fully supports it.
# If you bump this, rebuild in a CLEAN venv and confirm Traffic Analyzer
# opens in the frozen exe before shipping.
numpy>=1.24.0,<2.0; python_version < "3.13"
# Python 3.13+ gets numpy 2.x, and that is not a relaxation of the rule above.
# No numpy 1.x release ships a cp313 wheel, so on 3.13 the pin does not select
# 1.26 - it makes pip COMPILE 1.26 from source, which needs a full C toolchain
# and ten-plus minutes on every Debian 13 / Ubuntu 25 / Fedora 41 machine, and
# fails outright on any box without build-essential. The hazard the pin guards
# is a PyInstaller one, and nothing on 3.13 is ever frozen: the release build
# runs on 3.12 and resolves the line above. Source installs on 3.13 already
# run numpy 2.x in practice - the dev venv on the release box is on 2.5.1 -
# and no tracked module uses an API numpy 2 removed.
numpy>=2.1.0; python_version >= "3.13"

# For Live Device Sharing (WebSocket collaboration)
websockets>=12.0,<17.0.0

# For NL Device Control advanced scheduling
croniter>=2.0.0,<7.0.0

# For Fleet Diff async SSH operations
asyncssh>=2.14.0,<3.0.0

# For Fleet Diff PDF compliance reports
reportlab>=4.0.0,<5.0.0

# For Predictive Debug ML features (optional, has fallback)
# scikit-learn>=1.3.0,<2.0.0

# For Power Profiler I2C sensors (INA219/INA226)
# smbus2>=0.4.0,<1.0.0

# For Power Profiler USB meters
# pyserial>=3.5,<4.0.0

# =============================================================================
# NEW MODULE DEPENDENCIES (v1.13)
# =============================================================================

# For async HTTP operations (Splunk HEC, Cloud Tunnel, Protocol Translator)
aiohttp>=3.9.0,<4.0.0

# For Plugin Marketplace API client (optional, has urllib fallback)
# httpx>=0.27.0,<1.0.0

# =============================================================================
# NEW MODULE DEPENDENCIES (v1.14)
# =============================================================================

# -----------------------------------------------------------------------------
# NETWORK TOOLS
# -----------------------------------------------------------------------------

# Packet capture and protocol dissection
# NOTE (Windows): scapy requires the Npcap driver for packet capture to function.
# Npcap is NOT bundled with AidaIDE. Download and install from https://npcap.com/#download
# before using network capture features on Windows. On Linux, libpcap is usually
# already installed via your system package manager.
scapy>=2.5.0,<3.0.0

# Network topology visualization (vis.js generated via Python)
networkx>=3.2.0,<4.0.0

# DNS operations
dnspython>=2.5.0,<3.0.0

# WHOIS lookups (pentest recon)
python-whois>=0.9.0,<1.0.0

# -----------------------------------------------------------------------------
# SECURITY / PKI
# -----------------------------------------------------------------------------

# Certificate operations (extends cryptography)
pyOpenSSL>=24.0.0,<28.0.0

# SAST scanning (bandit integration)
# Optional — install only if using the Security > SAST Scanner tab.
# The tab detects absence and prompts to install at runtime.
# bandit>=1.7.0,<2.0.0

# Dependency vulnerability scanning
# Optional — install only if using the Security > Dep Scanner tab.
# pip-audit>=2.7.0,<3.0.0

# -----------------------------------------------------------------------------
# THREAT INTELLIGENCE
# -----------------------------------------------------------------------------

# MISP threat intelligence platform client
# Optional — install only if using the Threat Intel > MISP tab.
# pymisp>=2.4.0,<3.0.0

# VirusTotal API client
# Optional — install only if using the Threat Intel > VirusTotal tab.
# vt-py>=0.18.0,<1.0.0

# -----------------------------------------------------------------------------
# SYSADMIN - WINDOWS MANAGEMENT
# -----------------------------------------------------------------------------

# WinRM client for Windows remote management
pywinrm>=0.4.0,<1.0.0

# LDAP/Active Directory operations
ldap3>=2.9.0,<3.0.0

# -----------------------------------------------------------------------------
# SYSADMIN - CONFIGURATION MANAGEMENT
# -----------------------------------------------------------------------------

# Ansible playbook execution
# Optional — install only if using the Config Management tab (pulls ~80 MB Ansible).
# ansible-runner>=2.3.0,<3.0.0

# Template rendering (also used by Flask)
Jinja2>=3.1.0,<4.0.0

# YAML parsing for config files
PyYAML>=6.0.0,<7.0.0

# -----------------------------------------------------------------------------
# SYSADMIN - MONITORING
# -----------------------------------------------------------------------------

# Prometheus metrics exporter
prometheus-client>=0.19.0,<1.0.0

# -----------------------------------------------------------------------------
# SYSADMIN - CONTAINERS
# -----------------------------------------------------------------------------

# Docker SDK for Python
docker>=7.0.0,<8.0.0

# Kubernetes client
kubernetes>=29.0.0,<37.0.0

# -----------------------------------------------------------------------------
# SYSADMIN - DATABASE ADMINISTRATION
# -----------------------------------------------------------------------------

# MySQL/MariaDB connector
mysql-connector-python>=8.3.0,<9.0.0

# PostgreSQL adapter
psycopg2-binary>=2.9.0,<3.0.0

# SQLAlchemy ORM (for unified database layer)
SQLAlchemy>=2.0.0,<3.0.0

# Async SQLite support (for SQLAlchemy async with SQLite)
aiosqlite>=0.19.0,<1.0.0

# Async PostgreSQL support (for SQLAlchemy async with PostgreSQL)
asyncpg>=0.29.0,<1.0.0

# Redis client
redis>=5.0.0,<8.0.0

# MongoDB client
# Optional — install only if using Database tab with MongoDB connections.
# pymongo>=4.6.0,<5.0.0

# -----------------------------------------------------------------------------
# SYSADMIN - BACKUP & CLOUD STORAGE
# -----------------------------------------------------------------------------

# AWS S3 client (also used for S3-compatible storage)
# Optional — install only if using the Backup > S3/Cloud Storage tab (~35 MB).
# boto3>=1.34.0,<2.0.0

# Azure Blob Storage client
# Optional — install only if using the Backup > Azure Storage tab (~20 MB).
# azure-storage-blob>=12.19.0,<13.0.0

# -----------------------------------------------------------------------------
# INDUSTRIAL PROTOCOLS (Optional - install as needed)
# -----------------------------------------------------------------------------

# BACnet building automation protocol
# bacpypes3>=0.0.80,<1.0.0

# CAN bus communication
# python-can>=4.3.0,<5.0.0

# MQTT with Sparkplug B support
paho-mqtt>=2.0.0,<3.0.0

# EtherCAT master (requires Linux with RT kernel for best performance)
# pysoem>=1.1.0,<2.0.0

# -----------------------------------------------------------------------------
# REMOTE DESKTOP (Optional - enable in config: remote_desktop.enabled = true)
# -----------------------------------------------------------------------------
# When Remote Desktop is enabled, AidaIDE auto-installs these at startup via
# remote_desktop/__init__.py install_dependencies(). Listed here so developers
# setting up from source know to install them manually if needed.
#
# mss>=9.0.0               # Cross-platform screen capture (fast, pure-Python)
# pynput>=1.7.0            # Keyboard and mouse injection (falls back to pyautogui)

# -----------------------------------------------------------------------------
# EDGE ML MODEL ANALYSIS (Optional - install for AI model analysis features)
# -----------------------------------------------------------------------------
# edge_ml/ uses try/except guards and degrades gracefully without these.
# Install the ones you need for the model formats you work with.
#
# onnx>=1.15.0             # ONNX model inspection and analysis
# torch>=2.0.0             # PyTorch model analysis
# tensorflow>=2.13.0       # TensorFlow/Keras model analysis
# numpy>=1.24.0            # Required by all three above

# -----------------------------------------------------------------------------
# AI ASSISTANTS (Optional - provider-specific)
# -----------------------------------------------------------------------------

# OpenAI API client
# Optional -- install only if using OpenAI as your AI provider (not needed for Anthropic/Claude).
# openai>=1.12.0,<2.0.0

# Google Generative AI (Gemini)
# google-generativeai>=0.4.0,<1.0.0

# Groq API client
# groq>=0.4.0,<1.0.0

# -----------------------------------------------------------------------------
# REPORTING & VISUALIZATION
# -----------------------------------------------------------------------------

# PDF report generation (vulnerability reports, DR plans)
# Optional -- compliance/manager.py and security/scanners/unified_report.py both have
# graceful fallbacks (pdfkit -> HTML). Install only if you need PDF compliance exports.
# v62+ bundles its own Pango/Cairo -- no separate GTK runtime needed on Windows.
# weasyprint>=62.0,<63.0

# HTML/XML parsing (web recon, report generation)
beautifulsoup4>=4.12.0,<5.0.0
lxml>=5.1.0,<6.0.0

# -----------------------------------------------------------------------------
# COMPLIANCE FRAMEWORKS
# -----------------------------------------------------------------------------

# JSON Schema validation for board definitions and compliance frameworks
jsonschema>=4.21.0,<5.0.0

# =============================================================================
# BUILD & PACKAGING (v3.0)
# =============================================================================
# DEV-ONLY: These are NOT needed to run AidaIDE. Install only if you are
# building the installer or generating documentation from source.
# End users running from source only need the sections above this block.

# PyInstaller for standalone binary builds
# pyinstaller>=6.0.0,<7.0.0

# MkDocs for Developer Hub documentation site
# mkdocs>=1.5.0,<2.0.0
# mkdocs-material>=9.5.0,<10.0.0

# =============================================================================
# TESTING DEPENDENCIES
# =============================================================================
# DEV-ONLY: Not needed to run AidaIDE. Install to run the test suite.
# Quick install: pip install pytest pytest-cov pytest-mock pytest-asyncio pytest-timeout

# Core testing framework
# pytest>=8.0.0,<9.0.0

# Code coverage measurement
# pytest-cov>=4.1.0,<6.0.0

# Mocking utilities
# pytest-mock>=3.12.0,<4.0.0

# Async test support
# pytest-asyncio>=0.23.0,<1.0.0

# Test timeouts
# pytest-timeout>=2.2.0,<3.0.0

# Coverage badge generation (optional, for CI)
# coverage-badge>=1.1.0,<2.0.0
