# ======================
# 通用 / IDE
# ======================
# IDE
.idea/
*.iml
*.ipr
*.iws
.vscode/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db
desktop.ini

# 日志
*.log
logs/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# ======================
# 前端 (Node / Vite / React)
# ======================
node_modules/
dist/
dist-ssr/
.vite/
*.local

# 缓存
.cache/
.parcel-cache/
.eslintcache
.stylelintcache

# 测试 / 覆盖率
coverage/
*.lcov

# pnpm
.pnpm-store/

# ======================
# Python
# ======================
# 字节码
__pycache__/
*.py[cod]
*$py.class
*.so

# 虚拟环境
.venv/
venv/
env/
ENV/
.python-version

# 分发包 / 打包产物
*.egg
*.egg-info/
.eggs/
sdist/
wheels/
*.manifest
*.spec
pip-log.txt
pip-delete-this-directory.txt

# 测试 / 覆盖率
.pytest_cache/
.tox/
.nox/
.coverage
.coverage.*
htmlcov/
coverage.xml
*.cover

# 用户私有待提取文档（含真实业务数据，禁止开源）
*.docx
*.doc
*.pdf

# 用户私有定义文件（与私有文档配套，禁止开源）
backend/data/annotations/
backend/data/samples/
!**/info_definition.json
!**/info_instance.json

# 旧AI回归测试夹具属于工程资产
!backend/tests/legacy_ai/test_party.docx

# 类型检查 / lint 缓存
.mypy_cache/
.pyright/
.ruff_cache/
.dmypy.json
dmypy.json

# Jupyter
.ipynb_checkpoints/

# ======================
# 环境变量 / 密钥
# ======================
.env
.env.*
!.env.example
!.env.template
!.env.production

# ======================
# AI / 工具产物（按需启用）
# ======================
.spec-workflow/

# ======================
# DMS 运行时与交付产物
# ======================
# 正式文件存储只保留目录占位，不提交用户文件
backend/dms-storage/**
!backend/dms-storage/**/
!backend/dms-storage/**/.gitkeep

# 测试文件存储由测试数据和初始化命令生成
backend/dms-test-storage/
backend/dms-test-storage-*/

# 本地生成的部署包、演示压缩包和文档渲染临时目录
deliverables/
.docx-render-temp*/

# Codex 本地会话控制目录
.agents/

# ======================
# DMS 本地构建与发布产物（补充）
# ======================
# PyInstaller 中间字节码缓存；保留 build/ 下的 build.ps1 / *.spec / README.txt 作为工程资产
build/__pycache_build/

# PyInstaller --onedir 输出与历史备份
dist-package/
dist-package-bak/

# 本地数据库导出快照（schema/数据/manifest/本地存储镜像）
database/
