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

[project]
name = "larva"
version = "0.1.0"
description = "PersonaSpec toolkit for LLM agents"
readme = "README.md"
requires-python = ">=3.11"
license = "AGPL-3.0-or-later"
keywords = ["llm", "persona", "persona-spec", "mcp", "validation", "agent"]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Topic :: Software Development :: Libraries",
    "Typing :: Typed",
]
dependencies = [
    "ruamel.yaml>=0.18",
    "pydantic>=2.0",
    "click>=8.0",
    "rich>=13.0",
    "returns>=0.24",
]

[project.scripts]
larva = "larva.shell.cli:main"

[tool.hatch.build.targets.wheel]
packages = ["src/larva"]

[tool.mypy]
python_version = "3.11"
strict = true
warn_return_any = true
warn_unused_configs = true

[tool.ruff]
target-version = "py311"
line-length = 100

[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "UP", "B", "A", "SIM", "TCH"]

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

# Invar Configuration
[tool.invar.guard]
core_paths = ["src/larva/core"]
shell_paths = ["src/larva/shell"]
max_file_lines = 500
max_function_lines = 50
require_contracts = true
require_doctests = true
forbidden_imports = ["os", "sys", "socket", "requests", "urllib", "subprocess", "shutil", "io", "pathlib"]
exclude_paths = ["tests", "test", ".invar", "scripts", ".venv", "venv", "__pycache__", ".pytest_cache", ".vectl", "node_modules", "dist", "build"]

[dependency-groups]
dev = [
    "invar-tools>=1.20.1",
    "pytest>=8.4",
]
