# Versions pinned to Galena's, so a future merge has no dependency reconciliation.
# Every entry is permissive — the CI license gate (scripts/license_gate.py) denies GPL/AGPL/SSPL.

# Web framework
fastapi==0.115.6
uvicorn[standard]==0.34.0
python-multipart==0.0.20      # multipart/form-data 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

# 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)

# Auth
argon2-cffi==23.1.0           # Argon2id password hashing (MIT)

# Outbound HTTP — the ONE client, used only from app/integrations/ (invariant 8).
httpx==0.28.1                 # 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

# Document generation (pisma procesowe) — the same library Galena vendors, so a Stage B merge
# has nothing to reconcile.
python-docx==1.1.2            # MIT

# Secrets at rest. Exactly one thing in Sygna is stored recoverably — each user's Galena app
# token — because it has to be sent to Galena rather than merely recognised. Everything else a
# person entrusts to this system is a hash. The "if" in the line this replaces is now a "when".
cryptography==46.0.3          # AES-256-GCM (Apache-2.0/BSD)

# Planned for later phases (NOT installed yet — added when the phase starts):
#   signxml       — XAdES signing for KSeF (Apache-2.0)                         [Phase 2]
#   pyHanko       — PAdES signing for PDF pleadings (MIT)                       [Phase 5]

# The family's shared substrate: Base + mixins, the identity/node models, authz, the auth
# service, the engine factory, security primitives and the error shapes. Private repo; CI
# needs DREDD_CORE_TOKEN (see .github/workflows/ci.yml). `pip install -e ../dredd-core`
# shadows this pin — do not, without bumping a tag and repinning BOTH apps.
#
# v0.10.0 is what makes one account for the whole platform possible. It brings: the third shared
# table (`module_moderator` then, `module_permission` since v0.11.0) and the tiers in
# `dredd_core.moderation` (ADMINISTRATOR platform-wide, MODERATOR per module);
# `authz.bind_moderation`, which elevates a moderator exactly where
# `is_admin` already sits — before overlays, so Sygna's ethical walls still bar them;
# `dredd_core.identity_schema` (the boot assertion, and the merge helpers `0003` is built from);
# `schema.own_tables`, which keeps the platform's accounts out of one firm's backup archive; and
# two `AuthPolicy` flags that turn a write this module's database role cannot perform into a
# sentence rather than a 500.
#
# Every default reproduces v0.9.0's behaviour, so a standalone Sygna is unchanged by the bump:
# nothing above switches on until IDENTITY_SCHEMA is set.
#
# 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. The same two
# checks already sat inside `runtime_grants_sql`, but `0002` is only reached if `0001` succeeded, and
# as `postgres_managed` `0001` died on `relation "app_user" does not exist` instead — that role's
# search_path never carries `dredd`. 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, crucially, **no row means no access to that
# module**. That is the half of "one account" that did not exist before: a person the platform had
# heard of could open any module and merely find it empty. `moderation.assert_may_use` is the
# refusal, and it sits in `deps.get_current_user`; `ModerationPolicy`'s two flags are renamed to
# match (`shared_permissions`, `permission_writes_enabled`), and a module's tier on the shared table
# is SELECT and nothing else, because a module that could write it could admit and promote anyone,
# itself included. Standalone, core answers `"user"` for everybody, so the same guard at the same
# edge changes nothing here — but `0004` is not optional: `0001` built the table under its old name
# on every database migrated before this bump, and nothing else would ever rename it.
# dredd_core.search_contract, new in 0.17.0).
# v0.21.0 adds the platform's counterparty register (K2): Sygna WRITES it; party.counterparty_id links
# an organisation to its counterparty (revision 0006, services/parties.sync_counterparty).
# v0.23.0 brings `dredd_core.stats_contract` (the Compass split's M4): `GET /stats`, Panorama's tiles
# (services/stats.module_stats). 0.22.0 comes along and is opt-in (no table, no change here).
dredd-core @ git+http://77.216.148.202:3000/Haski/dredd-core.git@v0.23.0
