# =============================================================================
# Loose declarations — describes what we depend on by name and minimum version.
# Use this for development. For production / first-time installs, prefer:
#     pip install -r requirements.lock.txt
# which pins every transitive dependency to a known-good version.
# =============================================================================
#
# Regenerate the lock after upgrading anything here:
#     pip install -r requirements.txt --upgrade
#     pip freeze > requirements.lock.txt
# =============================================================================

# Web
flask>=2.0.0
flask-cors>=3.0.0
waitress>=3.0.0        # 统一 WSGI server（开发/生产），支持 SSE chunked
gunicorn>=26.2.0       # Linux 私有化部署备用
pyecharts>=2.0.0
selenium>=4.51.0
snapshot-selenium>=0.0.2
playwright>=1.40.0
scipy>=1.7.0

# Data
duckdb>=1.5.6,<2
pyarrow==24.0.0       # bounded file ingestion and immutable Parquet snapshots
psutil>=7.2,<8        # worker identity, process-tree and resource supervision
pandas>=1.3.0
numpy>=1.21.0
PyYAML>=6.0.3          # agent skill front matter parsing (import name: yaml)
openpyxl>=3.1.5
xlrd>=2.0.2
python-calamine>=0.1.0
pdfplumber>=0.11.0    # PDF table extraction for the web-table ingest pipeline (MIT, pure Python)

# Viz
plotly>=7.1.0
matplotlib>=3.4.0
# kaleido>=1.0.0    # 可选：/api/chart/<id>/png 服务端 PNG 导出；未安装时该端点返回 501
qrcode>=8.0,<9.0       # 本地生成邀请二维码，避免依赖外部图片服务

# HTTP / LLM
requests>=2.31.0
lark-oapi>=1.7.1,<2  # 飞书应用机器人长连接（本地入站事件）
charset-normalizer>=3.4.0  # requests 的间接依赖，3.4+ 支持 Python 3.14
openai>=3.35.1
python-dotenv>=1.0.0
httpx>=0.27.0

# Remote GPU connectivity (G2) — SSH tunnels and OS credential storage.
# keyring delegates to Windows Credential Manager, macOS Keychain, or the
# platform Secret Service; connection passwords are never stored in JSON.
paramiko>=5.1.0
keyring>=24.0.0

# Export (Output module)
python-docx>=0.8.11
python-pptx>=0.6.21
lxml>=4.6.0

# Time series analysis
statsmodels>=0.15.0
pmdarima>=2.0.0

# Database (agent)
sqlalchemy>=2.0.0
pymysql>=1.0.0        # MySQL driver
psycopg2-binary>=2.9  # PostgreSQL driver
pyodbc>=5.0.0         # SQL Server driver (requires Microsoft ODBC Driver 17/18 on the host)

# SQL parsing (AST-level validation & table-name extraction)
sqlglot>=30.21,<31  # shared strict DuckDB/Trino/Hive/Spark AST contract

# External data sources
gspread>=6.0.0
google-auth>=2.0.0

# Knowledge base (RAG — Chinese FTS5 tokenization)
jieba>=0.42.1

# Semantic embedding (neural_embedder — BGE-small-zh via ONNX Runtime)
# Replaces torch (~200MB) with onnxruntime (~30-50MB) for inference-only use.
# Pin tokenizers for compatibility with the Rust-backed tokenizer load path.
onnxruntime>=1.17.0
tokenizers>=0.15.0
