# 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).
#
# 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.10.0 is what makes ONE ACCOUNT possible: the shared identity schema (`ModuleModerator`,
# `SHARED_IDENTITY_TABLES`, `shared_identity_grants_sql`, `create_identity_tables`,
# `assert_identity_schema`, `repoint_identity_fks_sql`), the two administration tiers
# (`dredd_core.moderation`), and `AuthPolicy.identity_writes_enabled` / `local_login_enabled`.
# Every default reproduces v0.9.0's behaviour, so a standalone Atrium is unchanged by the bump; what
# uses the new surface here is `alembic/versions/0004_shared_identity.py`, and it does nothing at all
# 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. 0003's runtime
# grants already made the same two checks, but 0003 is only reached once 0001 and 0002 have succeeded,
# so as the platform admin the hub built the whole platform's accounts first — owned by that role, and
# on a managed provider open to its auto-generated API — with nothing but Alembic's transaction undoing
# it. This is the one revision in the family where that matters most. Required: `0001` imports it.
#
# v0.11.0 answers the second of the owner's three requests — "separate tables for permissions that
# control what it can do on what modules". `ModuleModerator` becomes `ModulePermission`: the same
# row plus a `role` (`MODULE_ROLES` = user | moderator), so the THIRD answer is the absence of a
# row, and that answer is **no access to that module at all**. Before it, anybody with an account
# could type `/galena` and be let in; they saw an empty drive, but nothing had refused them, and
# "you can see nothing" is not an access decision.
#
# Renamed with it: `ModerationPolicy.shared_permissions` / `permission_writes_enabled`,
# `list_permissions`, and `shared_identity_grants_sql(permission_table=…)`. New: `module_role`,
# `may_use` / `assert_may_use` (the guard each MODULE puts in `get_current_user` — Atrium does not,
# because every account may open the launcher), `module_roles`, `member_ids`, and a `grant` that
# UPSERTs, so promoting and demoting are one call rather than a revoke plus a grant. On that table
# the hub holds SELECT/INSERT/UPDATE/DELETE and a module holds SELECT and nothing else: a module
# that could write its own permission rows could admit anyone, promote anyone, and promote itself.
# Standalone still answers `"user"` for everybody and emits no SQL, so a lone Atrium is unchanged.
#
# Atrium is the only WRITER of that table. Two revisions carry the bump, and they are different
# halves: `0004` (the cutover, which has still never run anywhere) moves it to the shared schema,
# and `0006_module_permission.py` renames it in this app's OWN schema — which `0001` being stamped
# could never have reached, and which is the `node_kind` mistake the family has made once already.
#
# v0.19.0 (document_ref, plain_files, module_client) needs nothing here: no schema or grant change.
# v0.20.0 adds the module events: the shared `module_event` log the hub creates and grants in its
# identity schema (`alembic/versions/0011_module_events.py`, re-applied by `app.identity_grants`).
# v0.21.0 adds the counterparty register: the three shared tables the hub creates and grants in its
# identity schema (`alembic/versions/0012_counterparties.py`, re-applied by `app.identity_grants`),
# and the import door modules move their own counterparties in through. The hub holds no tier on them.
dredd-core @ git+http://77.216.148.202:3000/Haski/dredd-core.git@v0.26.1

# Web framework
fastapi==0.115.6
uvicorn[standard]==0.34.0
# The front door's reverse proxy to the modules (app/frontdoor.py): one streaming AsyncClient per
# worker. BSD-3-Clause. Same pin as the test transport in requirements-dev.txt.
httpx==0.28.1

# 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). 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.
# AES-256-GCM for model-provider API keys (app/provider_keys.py). Apache-2.0 OR BSD-3-Clause. Same
# pin as Arbiter, whose runs decrypt the keys the hub writes.
cryptography==46.0.3
# SKILL.md frontmatter in skill packs (app/services/skill_pack.py) — `yaml.safe_load` only, never the
# full loader. MIT.
PyYAML==6.0.3


# 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
