# Every entry is permissive — the CI license gate (scripts/license_gate.py) denies GPL/AGPL/SSPL.

# ── The shared core ───────────────────────────────────────────────────────────
# dredd-core carries the family's identity + org-tree models, auth, authz, audit, errors, security
# helpers and the enum-type creator. It is a real dependency, not copied source: `import dredd_core`
# is what puts the shared tables on `Base.metadata`, and the app-side modules that keep the old
# filenames are thin re-export shims over it.
#
# Pinned by TAG, never a branch — a moving ref would change this app's schema between two otherwise
# identical `pip install` runs. To move to a newer core: bump the tag, run the tests, and add a NEW
# alembic revision for whatever tables or columns the bump brings (never edit 0001).
#
# From v0.10.0 core also carries what lets this app be a MODULE of the platform rather than its own
# island: the shared identity tables and `own_tables`, the column and table grant tiers a module is
# held to, the boot assertion and merge helpers (`identity_schema`), the two `AuthPolicy` flags that
# turn "this module may not write accounts" into a clean 409 instead of a Postgres permission error
# dressed up as a 500, and the tiers (`moderation`, `authz.bind_moderation`). v0.11.0 then turned the
# moderator roster into `module_permission` — one row per person per module, carrying a `role`, and
# **no row meaning no access to that module at all** — which is what `deps.get_current_user` asks
# with `assert_may_use`. Every one of those defaults to the previous behaviour, so a STANDALONE app —
# its own database, its own people, no hub — is unchanged by them: core answers `"user"` for
# everybody there and emits no SQL. The platform shape is switched on by IDENTITY_SCHEMA and by
# nothing else.
#
# The repo is PRIVATE, so pip needs credentials to fetch it:
#   local — a read-only Gitea access token in your git credential helper (or an SSH `insteadOf` rewrite)
#   CI    — the Haski org secret DREDD_CORE_TOKEN; see the workflow-level `env:` in .github/workflows/
#
# v0.23.0 brings `dredd_core.stats_contract` (the Compass split's M4): `GET /stats`, Panorama's tiles
# (services/stats.py). 0.18.0-0.22.0 come along; their additions are opt-in (no table needed here).
dredd-core @ git+http://77.216.148.202:3000/Haski/dredd-core.git@v0.23.0

# Web framework
fastapi==0.161.0
starlette==1.9.0               # pinned explicitly so the mcp SDK cannot float it
uvicorn[standard]==0.54.0
python-multipart==0.0.32      # multipart/form-data uploads (Apache-2.0)

# Validation / settings
pydantic==2.14.1
pydantic-settings==2.16.1
# email validation is done in-app via a regex validator (schemas.Email) — no email-validator dependency

# DB / ORM / migrations
SQLAlchemy==2.0.50
alembic==1.14.0
pg8000==1.31.5                # pure-Python PostgreSQL driver, BSD-3-Clause (no LGPL, no libpq)

# Auth
argon2-cffi==23.1.0           # Argon2id password hashing (MIT). dredd-core depends on it too, so
                              # this is now a re-pin rather than the only source — kept explicit so
                              # the version is visible here and the license gate sees it named.

# MCP — the official Python SDK, mounted at /mcp in this same app (app/mcp_server.py).
mcp==2.3.0                   # MIT
sse-starlette==3.5.0          # BSD-3-Clause — mcp's dependency

# PDF text layer (the always-available OCR tier). The OCR ENGINES are NOT here — they are optional,
# in requirements-ocr.txt, installed only by Dockerfile.ocr (compose profile `ocr`).
pypdfium2==4.30.0             # Apache-2.0 OR BSD-3-Clause (PDFium: BSD-3-Clause + permissive third-party)

# INDEXED mode's full-text engine — embedded (no server, no JVM), BM25; wheels for manylinux
# x86_64/aarch64 and win_amd64. Language analysis happens in Python (app/integrations/analysis.py:
# the sjp.pl lexicon built into the image, plstem as the fallback) — no dependency.
# Only imported when INSIDER_INDEX_ENABLED (import-guarded in app/services/textindex.py).
tantivy==0.26.2               # MIT

# Import schedules: INSIDER_*_SCHEDULE cron expressions, evaluated in INSIDER_SCHEDULE_TZ.
croniter==6.0.0               # MIT (pulls python-dateutil Apache-2.0/BSD-3, pytz MIT, six MIT)
tzdata==2026.5                # Apache-2.0 — IANA zones for zoneinfo; a slim image ships none
# The reference graph's citation parser (app/services/legalref.lark): pure Python, no deps.
lark==1.2.2                   # MIT
# The reference graph's pages (/graph, app/routers/graph.py): server-rendered, autoescaped.
Jinja2==3.1.6                 # BSD-3-Clause (pulls MarkupSafe, BSD-3-Clause)
# Models for search (app/ai/): local CPU embeddings + reranking, no torch. All import-guarded and
# lazy — without them, or before the background job has downloaded a model, search is BM25 alone.
# Generators (Claude, Bielik, Mistral, Ollama…) are plain httpx calls, no vendor SDK.
onnxruntime==1.31.0           # MIT (deps: numpy, protobuf BSD-3, flatbuffers Apache-2.0, packaging)
tokenizers==0.23.3            # Apache-2.0 (pulls huggingface-hub Apache-2.0 → tqdm MPL-2.0 AND MIT)
numpy==2.3.5                  # BSD-3-Clause — held below 2.4: paddleocr 3.7 (paddlex 3.7.x, requirements-ocr.txt) needs numpy<2.4
# the platform's provider-key cipher (AES-256-GCM), for INSIDER_GENERATOR=provider:…
cryptography==50.0.2          # Apache-2.0 OR BSD-3-Clause

# Outbound HTTP — the ONE client, used only from app/integrations/.
httpx==0.28.1                 # BSD-3-Clause

# OpenTelemetry (OTLP → OTel Collector) — optional, import-guarded in observability.py
opentelemetry-sdk==1.45.1
opentelemetry-exporter-otlp-proto-grpc==1.45.1
opentelemetry-instrumentation-fastapi==0.66b1
opentelemetry-instrumentation-sqlalchemy==0.66b1
