[project]
name = "state-hub"
version = "0.1.0"
description = "Custodian State Hub — PostgreSQL + FastAPI + MCP server"
requires-python = ">=3.12"
dependencies = [
    "fastapi>=0.115.0",
    "uvicorn[standard]>=0.32.0",
    "sqlalchemy[asyncio]>=2.0.0",
    "asyncpg>=0.30.0",
    "alembic>=1.14.0",
    "pydantic>=2.10.0",
    "pydantic-settings>=2.7.0",
    "httpx>=0.28.0",
    "fastmcp>=2.0.0",
    "python-dotenv>=1.0.0",
    "psycopg2-binary>=2.9.0",
    "llm-connect",
    "pyyaml>=6.0.3",
    "nats-py>=2.7.0",
    "hub-core",
]

[project.scripts]
custodian = "custodian_cli:main"
statehub = "custodian_cli:main"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["api", "mcp_server", "task_flow_engine"]
artifacts = [
    "custodian_cli.py",
    "repository_rename_cli.py",
    "repository_rename_workplan.py",
    "statehub_register.py",
    "scripts/consistency_check.py",
    "scripts/repo_sync.py",
    "scripts/mcp_registration.py",
    "scripts/project_claude_md.template",
    "scripts/project_rules/*.template",
]

[tool.hatch.build.targets.wheel.force-include]
"custodian_cli.py" = "custodian_cli.py"
"repository_rename_cli.py" = "repository_rename_cli.py"
"repository_rename_workplan.py" = "repository_rename_workplan.py"
"statehub_register.py" = "statehub_register.py"
"scripts/consistency_check.py" = "scripts/consistency_check.py"
"scripts/ensure_gitignore_claude_rules.py" = "scripts/ensure_gitignore_claude_rules.py"
"scripts/repo_sync.py" = "scripts/repo_sync.py"
"scripts/mcp_registration.py" = "scripts/mcp_registration.py"
"scripts/project_claude_md.template" = "scripts/project_claude_md.template"
"scripts/project_rules" = "scripts/project_rules"

[tool.uv.sources]
llm-connect = { path = "/home/worsch/llm-connect", editable = true }
hub-core = { path = "/home/worsch/hub-core", editable = true }

[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]

[tool.uv]
dev-dependencies = [
    "pytest>=8.0.0",
    "pytest-asyncio>=0.24.0",
    "httpx>=0.28.0",
]
