The single choke-point for all binary file I/O (originals, derived artifacts, exports), replacing the scattered open()/shutil/Path.write_bytes calls across ~8 services. Backend chosen by STORAGE_BACKEND: - filesystem (default): disk under DATA_DIR — byte-for-byte legacy behaviour - dual: write disk + S3, read S3→disk fallback (migration window) - s3: MinIO via aioboto3 (lazy import; absent in the filesystem path) Keys are DATA_DIR-relative POSIX paths; the FS backend ignores the logical bucket and keeps the existing single tree, so the default backend is zero behaviour change. S3 maps a governance bucket (documents/immutable/derived) → MinIO bucket; presigned URLs are minted against the public endpoint (browser-reachable) and carry the Hebrew filename via RFC-5987 Content-Disposition. - config: STORAGE_BACKEND + MINIO_* (endpoint, public-endpoint, creds, region, 3 bucket names, presign TTL) - mcp_env_catalog: new "storage" category + 10 specs (X10/INV-ENV1) - pyproject: aioboto3>=13 (consumed here, deployed with first use) - tests: 18 unit tests (FS round-trip, key normalization/traversal guard, bucket resolution, backend selection, dual write-both + S3-down fallback) No call-sites are rewired yet — that is Phase 2 (106.3). STORAGE_BACKEND stays filesystem in prod, so behaviour is unchanged. Invariants: keeps G2 (one storage path replaces scattered I/O); establishes INV-STG1 (single layer), INV-STG2 (atomic keys, Hebrew name in metadata), INV-STG3 (governance buckets), INV-STG6 (presigned serving). Spec: docs/spec/X14-storage-minio.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
45 lines
1.3 KiB
TOML
45 lines
1.3 KiB
TOML
[project]
|
|
name = "legal-mcp"
|
|
version = "0.1.0"
|
|
description = "MCP server for AI-assisted legal decision drafting"
|
|
requires-python = ">=3.10"
|
|
dependencies = [
|
|
"mcp[cli]>=1.0.0",
|
|
"asyncpg>=0.29.0",
|
|
"pgvector>=0.3.0",
|
|
"voyageai>=0.3.0",
|
|
"python-dotenv>=1.0.0",
|
|
"pydantic>=2.0.0",
|
|
"pymupdf>=1.25.0",
|
|
"python-docx>=1.1.0",
|
|
"striprtf>=0.0.26",
|
|
"redis>=5.0.0",
|
|
"rq>=1.16.0",
|
|
"pillow>=10.0.0",
|
|
"google-cloud-vision>=3.7.0",
|
|
"fastapi>=0.115.0",
|
|
"uvicorn[standard]>=0.30.0",
|
|
"httpx>=0.27.0",
|
|
"infisicalsdk>=1.0.0",
|
|
"aioboto3>=13.0.0", # X14 object storage (MinIO/S3) — services/storage.py
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
# Tier-1 court-verdict fetch (X13) — host-only. The container can't run a
|
|
# browser, so these are NOT in the base deps; install on the host venv with
|
|
# `pip install -e ".[court-fetch]" && python -m camoufox fetch`. faster-whisper
|
|
# is only for the explicit-PDF-download reCAPTCHA fallback (the primary
|
|
# image-API path needs no solving).
|
|
court-fetch = [
|
|
"camoufox>=0.4.11",
|
|
"faster-whisper>=1.0.0",
|
|
"h2>=4.0.0", # Tier-0 supremedecisions uses httpx http2
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=68.0"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["src"]
|