# Web framework
fastapi==0.115.6
uvicorn[standard]==0.34.0
python-multipart==0.0.20      # multipart/form-data file uploads (Apache-2.0)

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

# Family shared core — identity, sessions, auth, authz + the org tree, audit, the engine factory,
# column types and shared enums/errors that every Dredd-family app builds on. Private repo; CI installs
# it with a read-only token (see
# .github/workflows/ci.yml). Pinned to a tag for reproducibility; for local co-development,
# `pip install -e ../dredd-core` shadows this pin.
#
# v0.10.0 is what lets Galena be a MODULE of the platform rather than its own island: the shared
# identity tables (`SHARED_IDENTITY_TABLES`, `own_tables`), the column/table grant tiers a module is
# held to (`shared_identity_grants_sql`, rendered by the hub), the boot assertion and merge helpers
# (`identity_schema.py`), 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 MODERATOR tier
# (`moderation.py`, `authz.bind_moderation`). Every default reproduces v0.9.0's behaviour, so a
# STANDALONE Galena — its own database, its own people, no hub — is unchanged by the bump; the
# platform shape is switched on by IDENTITY_SCHEMA and by nothing else.
#
# v0.10.1 adds `schema.migration_preflight_sql` — the statement `0001` now runs FIRST, refusing a
# superuser, the platform admin or the runtime role BY NAME before anything is created. 0006's runtime
# grants already made the same two checks, but 0006 is only reached once 0001-0005 have succeeded, so
# as the wrong role Galena built every table first and nothing but Alembic's transaction undid it.
# Required, not optional: `0001` imports it.
#
# v0.11.0 replaces `module_moderator` with `module_permission`: one row per person per module,
# carrying a `role` of `user` or `moderator` — and NO ROW meaning no access to that module at all.
# That last answer is the point of the bump. Until it, anybody with a platform account could type
# `/galena` and be let in; they saw an empty drive, but nothing had refused them. `deps.get_current_user`
# now calls `assert_may_use`, which is a no-op standalone (core answers `"user"` for everybody where
# there is no platform), so the same guard sits at the edge of both shapes. The renames that reach
# this app are `ModuleModerator` -> `ModulePermission` and the two policy flags
# (`shared_moderators` -> `shared_permissions`, `moderator_writes_enabled` ->
# `permission_writes_enabled`); `is_moderator` / `assert_moderator` / `moderated_slugs` /
# `moderator_ids` keep their names and signatures. Revision `0008` renames the table on databases
# whose `0001` ran while v0.10.x was pinned.
# dredd_core.search_contract, new in 0.17.0).
#
# v0.20.0 brings `dredd_core.events` (the Compass split's K1): the event log `module_event` (on the
# platform the hub's, in the shared schema; standalone this schema's own), row-level security binding
# `source_role` to `current_user`, and the receiver's cursor + receipts. Revision `0011` follows it.
#
# 0.23.0 brings `dredd_core.stats_contract` (the Compass split's M4): `GET /stats`, Panorama's tiles.
# 0.21.0 and 0.22.0 come along and are opt-in (no table, no change
# for this app).
dredd-core @ git+http://77.216.148.202:3000/Haski/dredd-core.git@v0.23.0

# DB / ORM / migrations
SQLAlchemy==2.0.50
alembic==1.14.0
pg8000==1.31.2                # pure-Python PostgreSQL driver, BSD-3-Clause (no LGPL, no libpq)
scramp==1.4.6                 # pg8000's SCRAM, MIT-0. Held below 1.5.0: with pg8000 1.31.2 it breaks a
                              # TLS connection (make_channel_binding; Atrium#53). Lift with a pg8000 that fixes it.

# Auth + encryption
argon2-cffi==23.1.0           # Argon2id password + passphrase KDF (MIT)
cryptography==44.0.0          # AES-256-GCM envelope encryption (Apache-2.0 / BSD)

# Git facade
GitPython==3.1.44             # BSD-3-Clause; wraps the system `git` binary

# Image thumbnails / EXIF
Pillow==11.1.0                # HPND (permissive)

# Office documents — in-app editing of DOCX/ODT via the Markdown editor (body-level, lossy round-trip;
# see OPTIONS.md option #2). All permissive. RTF is read-only (no maintained permissive writer) and
# legacy DOC is download-only (no permissive reader) — both fall back to the download→edit→re-upload
# handoff (option #1).
python-docx==1.1.2            # DOCX read + write (MIT)
odfdo==3.22.8                 # ODT read + write (Apache-2.0); 3.22+ needed for lxml 5.x
striprtf==0.0.26              # RTF → text extraction, read-only (BSD-3-Clause)
pypdf==4.3.1                  # PDF → text for the chat's questions about a contract (BSD-3-Clause)

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

# Optional extras (NOT installed by default — keep the core dependency set copyleft-free):
#   pywebpush     — browser push delivery (MPL-2.0). Install only if you enable web push.
#   boto3         — S3 (and S3-compatible) backup storage (Apache-2.0). Install only if you pick the
#                   S3 backup target; local-disk backups need nothing extra.
