Live drain surfaced three issues:
1. Tier-0 needed `h2` (httpx http2) — added to the court-fetch extra.
2. Supreme cases that carry a נט-format number (e.g. בר"מ 72182-06-25) were
routed to the unvalidated Tier-0 and failed, even though נט המשפט serves
Supreme cases too. classify() now parses the file-month-year triple for
Supreme prefixes; the orchestrator routes by triple-availability:
נט-format present → Tier-1 (validated, all courts)
serial-only Supreme (עע"מ 5886/24) → Tier-0
neither → clear "no public route" failure
Validated live: בר"מ 72182-06-25 fetched via Tier-1 (5-page PDF).
3. A non-`RuntimeError` fetch exception (the h2 import error) left jobs stuck
in 'running'. The fetch block now catches any Exception → _record_failure
(INV-CF2/CF3), so a job always reaches a terminal state.
+ test_supreme_with_net_format_triple. Suite 11/11.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
44 lines
1.2 KiB
TOML
44 lines
1.2 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",
|
|
]
|
|
|
|
[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"]
|