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

[project]
name = "policyshield"
version = "0.13.0"
description = "Declarative firewall for AI agent tool calls"
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
authors = [
    { name = "PolicyShield Team" },
]
keywords = ["ai", "agent", "firewall", "policy", "security", "tool-calls", "guardrails", "llm"]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Topic :: Security",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Typing :: Typed",
]
dependencies = [
    "pyyaml",
    "pydantic>=2.0",
]

[project.optional-dependencies]
langchain = ["langchain-core>=0.2"]
crewai = ["crewai>=0.30"]
otel = [
    "opentelemetry-api>=1.20",
    "opentelemetry-sdk>=1.20",
    "opentelemetry-exporter-otlp-proto-grpc>=1.20",
]
dashboard = [
    "fastapi>=0.100",
    "uvicorn[standard]>=0.20",
    "websockets>=11.0",
]
server = [
    "fastapi>=0.100",
    "uvicorn[standard]>=0.20",
    "httpx>=0.24",
]
prometheus = [
    "prometheus-client>=0.17",
]
ai = [
    "openai>=1.0",
    "anthropic>=0.20",
]
docs = [
    "mkdocs-material>=9.0",
    "mkdocstrings[python]>=0.24",
]
dev = [
    "pytest",
    "pytest-asyncio",
    "pytest-cov",
    "ruff",
    "tomli; python_version < '3.11'",
]
all = [
    "policyshield[langchain,crewai,otel,dashboard,prometheus,docs,dev]",
]

[project.scripts]
policyshield = "policyshield.cli.main:app"

[project.urls]
Homepage = "https://github.com/mishabar410/PolicyShield"
Documentation = "https://mishabar410.github.io/PolicyShield/"
Repository = "https://github.com/mishabar410/PolicyShield"
Issues = "https://github.com/mishabar410/PolicyShield/issues"
Changelog = "https://github.com/mishabar410/PolicyShield/blob/main/CHANGELOG.md"

[tool.hatch.build.targets.sdist]
exclude = [
    "tests/",
    "prompts/",
    ".github/",
    ".venv/",
    "dist/",
]

[tool.hatch.build.targets.wheel]
packages = ["policyshield"]

[tool.ruff]
line-length = 120
target-version = "py310"

[tool.pytest.ini_options]
markers = [
    "benchmark: performance benchmarks (deselect with '-m \"not benchmark\"')",
    "slow: slow tests",
]
addopts = "-m 'not benchmark'"

[tool.coverage.run]
omit = [
    "policyshield/trace/otel.py",
]

