Files
psyc/pyproject.toml
m17hr1l 9e4c217a3d stage-17: operational hardening — .env keys, model status, backup
Three load-bearing operational pieces before any new features:

* .env.example committed, .env gitignored — per-developer API keys
  (THREATFOX_AUTH_KEY, OTX_API_KEY, NVD_API_KEY) ready for the registrations
  ahead; python-dotenv loads it in the venv CLI; compose picks it up via
  env_file: .env on the cockpit service.

* Cockpit /api/inference-status endpoint + a topbar status chip that polls it
  on page load — "model · live" green when up, "model · offline" amber when
  the inference server is unreachable. No more manual checking. Compose also
  gains a healthcheck on the inference service (applies on next recreate).

* New `psyc backup` command — tars the audit trail (db + sealed packages +
  recipient keys + ledger + datasets) to data/backups/psyc-data-<ts>.tar.gz.
  Excludes the HF model cache, mock-cert receipts, and the re-trainable
  adapters — the goal is the irrecoverable evidence, not bulk artifacts.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 19:44:58 +02:00

45 lines
854 B
TOML

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "psyc"
version = "0.1.0"
description = "Defensive CTI routing & evidence-sealing platform"
requires-python = ">=3.10"
dependencies = [
"fastapi>=0.115",
"uvicorn[standard]>=0.30",
"jinja2>=3.1",
"python-multipart>=0.0.9",
"pydantic>=2.7",
"httpx>=0.27",
"typer>=0.12",
"pynacl>=1.5",
"structlog>=24.1",
"sqlalchemy>=2.0",
"python-dotenv>=1.0",
]
[project.optional-dependencies]
dev = ["pytest>=8.0"]
[project.scripts]
psyc = "psyc.cli:app"
[tool.hatch.build.targets.wheel]
packages = ["src/psyc"]
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.ruff]
line-length = 120
[tool.ruff.lint]
select = ["E", "F", "I", "B"]
ignore = ["UP006", "UP007", "UP035"]
[tool.ruff.lint.isort]
known-first-party = ["psyc"]