2025-12-10 02:49:54 +01:00
|
|
|
[project]
|
|
|
|
|
name = "roboco"
|
2026-06-20 20:35:48 +02:00
|
|
|
version = "0.8.0"
|
2025-12-10 02:49:54 +01:00
|
|
|
description = "AI Agents Company - A virtual organization of AI agents functioning as a software development workforce"
|
2025-12-10 17:35:43 +01:00
|
|
|
authors = [
|
|
|
|
|
{name = "Renzo Franceschini", email = "rennf93@users.noreply.github.com"}
|
|
|
|
|
]
|
2025-12-10 02:49:54 +01:00
|
|
|
readme = "README.md"
|
2026-05-31 00:48:50 +02:00
|
|
|
license = { text = "AGPL-3.0-or-later" }
|
2026-06-22 13:02:59 +02:00
|
|
|
requires-python = ">=3.13,<3.15"
|
2025-12-10 02:49:54 +01:00
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
|
# Core
|
2025-12-10 17:35:43 +01:00
|
|
|
"pydantic",
|
2026-06-22 12:37:46 +02:00
|
|
|
"pydantic-settings",
|
2025-12-10 02:49:54 +01:00
|
|
|
# API
|
2025-12-10 17:35:43 +01:00
|
|
|
"fastapi",
|
|
|
|
|
"uvicorn[standard]",
|
|
|
|
|
"websockets",
|
2025-12-10 02:49:54 +01:00
|
|
|
# Database
|
2025-12-10 17:35:43 +01:00
|
|
|
"sqlalchemy[asyncio]",
|
|
|
|
|
"asyncpg", # PostgreSQL async driver
|
|
|
|
|
"alembic", # Migrations
|
2025-12-10 02:49:54 +01:00
|
|
|
# Cache/Queue
|
2025-12-10 17:35:43 +01:00
|
|
|
"redis",
|
|
|
|
|
"hiredis", # Redis performance
|
2025-12-10 02:49:54 +01:00
|
|
|
# AI/LLM
|
2025-12-10 17:35:43 +01:00
|
|
|
"anthropic",
|
|
|
|
|
"openai", # For embeddings
|
|
|
|
|
"tiktoken", # Token counting
|
2025-12-12 18:08:06 +01:00
|
|
|
"python-toon", # Token-efficient LLM serialization
|
2025-12-10 17:35:43 +01:00
|
|
|
# MCP (Model Context Protocol)
|
|
|
|
|
"mcp",
|
2026-06-19 09:15:01 +02:00
|
|
|
"tomli-w", # grok_cli_config renders ~/.grok/config.toml in the agent image
|
2025-12-10 02:49:54 +01:00
|
|
|
# Utilities
|
2025-12-10 17:35:43 +01:00
|
|
|
"httpx",
|
|
|
|
|
"python-multipart",
|
|
|
|
|
"python-jose[cryptography]", # JWT
|
|
|
|
|
"passlib[bcrypt]", # Password hashing
|
|
|
|
|
"tenacity", # Retry logic
|
|
|
|
|
"structlog", # Structured logging
|
2025-12-28 19:52:01 +01:00
|
|
|
# Streaming
|
|
|
|
|
"sse-starlette", # Server-Sent Events for A2A streaming
|
2026-04-21 17:48:45 +02:00
|
|
|
# Direct imports (promoted from transitive)
|
|
|
|
|
"cryptography", # utils/crypto.py — Fernet-encrypted project git tokens
|
2026-06-22 01:25:47 +02:00
|
|
|
"packaging", # services/toolchain.py — PEP 440 requires-python resolution
|
2026-06-22 03:49:45 +02:00
|
|
|
"pyyaml", # foundation/policy/conventions — .roboco/conventions.yml parse
|
2026-06-22 12:37:46 +02:00
|
|
|
# Conventions validator (roboco.conventions) — tree-sitter ASTs, Python + TS
|
|
|
|
|
"tree-sitter",
|
|
|
|
|
"tree-sitter-python",
|
|
|
|
|
"tree-sitter-typescript",
|
|
|
|
|
"claude-agent-sdk",
|
2025-12-10 02:49:54 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[project.optional-dependencies]
|
|
|
|
|
dev = [
|
|
|
|
|
# Testing
|
2025-12-10 17:35:43 +01:00
|
|
|
"pytest",
|
|
|
|
|
"pytest-asyncio",
|
|
|
|
|
"pytest-cov",
|
|
|
|
|
"pytest-xdist",
|
|
|
|
|
"httpx", # For TestClient
|
|
|
|
|
"factory-boy",
|
|
|
|
|
"faker",
|
2025-12-10 02:49:54 +01:00
|
|
|
|
|
|
|
|
# Code Quality
|
2025-12-10 17:35:43 +01:00
|
|
|
"ruff",
|
|
|
|
|
"mypy",
|
2025-12-13 13:25:37 +01:00
|
|
|
"vulture",
|
|
|
|
|
"bandit",
|
|
|
|
|
"pip-audit",
|
|
|
|
|
"radon",
|
|
|
|
|
"xenon",
|
|
|
|
|
"deptry",
|
2026-05-02 03:11:49 +02:00
|
|
|
"import-linter",
|
2025-12-10 02:49:54 +01:00
|
|
|
|
|
|
|
|
# Type Stubs
|
2025-12-10 17:35:43 +01:00
|
|
|
"types-passlib",
|
|
|
|
|
"types-python-jose",
|
2026-06-22 03:49:45 +02:00
|
|
|
"types-PyYAML",
|
2025-12-10 02:49:54 +01:00
|
|
|
|
|
|
|
|
# Development
|
2025-12-10 17:35:43 +01:00
|
|
|
"ipython",
|
|
|
|
|
"rich",
|
2025-12-10 02:49:54 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
docs = [
|
2025-12-10 17:35:43 +01:00
|
|
|
"mkdocs",
|
|
|
|
|
"mkdocs-material",
|
|
|
|
|
"mkdocstrings[python]",
|
2026-06-22 15:53:00 +02:00
|
|
|
"pymarkdownlnt",
|
2025-12-10 02:49:54 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[project.scripts]
|
2026-06-22 15:53:00 +02:00
|
|
|
roboco = "roboco.cli:cli"
|
2025-12-10 17:35:43 +01:00
|
|
|
roboco-bootstrap = "roboco.bootstrap:cli"
|
2025-12-10 02:49:54 +01:00
|
|
|
|
|
|
|
|
[project.urls]
|
2026-06-06 22:10:48 +02:00
|
|
|
Homepage = "https://github.com/rennf93/roboco"
|
2026-06-22 16:09:05 +02:00
|
|
|
Documentation = "https://rennf93.github.io/roboco/"
|
2026-06-06 22:10:48 +02:00
|
|
|
Repository = "https://github.com/rennf93/roboco"
|
2025-12-10 02:49:54 +01:00
|
|
|
|
|
|
|
|
[build-system]
|
|
|
|
|
requires = ["hatchling"]
|
|
|
|
|
build-backend = "hatchling.build"
|
|
|
|
|
|
|
|
|
|
[tool.hatch.build.targets.wheel]
|
2025-12-10 17:37:24 +01:00
|
|
|
packages = ["roboco"]
|
2025-12-10 02:49:54 +01:00
|
|
|
|
2025-12-10 17:35:43 +01:00
|
|
|
[tool.hatch.metadata]
|
|
|
|
|
allow-direct-references = true
|
|
|
|
|
|
2026-06-03 20:45:32 +02:00
|
|
|
# =============================================================================
|
|
|
|
|
# uv: raise the floor on vulnerable transitive dependencies
|
|
|
|
|
# =============================================================================
|
|
|
|
|
# pyjwt is pulled in transitively (by mcp and msal). 2.12.1 carries four
|
|
|
|
|
# disclosed CVEs that are fixed in 2.13.0; constrain the floor so the resolver
|
|
|
|
|
# picks a patched release while leaving the direct dependents' own ranges intact.
|
|
|
|
|
[tool.uv]
|
|
|
|
|
constraint-dependencies = ["pyjwt>=2.13.0"]
|
|
|
|
|
|
2025-12-10 02:49:54 +01:00
|
|
|
# =============================================================================
|
|
|
|
|
# RUFF Configuration
|
|
|
|
|
# =============================================================================
|
|
|
|
|
[tool.ruff]
|
2025-12-10 17:35:43 +01:00
|
|
|
target-version = "py313"
|
2025-12-10 02:49:54 +01:00
|
|
|
src = ["src"]
|
2025-12-11 01:05:20 +01:00
|
|
|
exclude = ["vulture_whitelist.py", ".venv", "alembic"]
|
2025-12-10 02:49:54 +01:00
|
|
|
|
|
|
|
|
[tool.ruff.lint]
|
|
|
|
|
select = [
|
|
|
|
|
"E", # pycodestyle errors
|
|
|
|
|
"W", # pycodestyle warnings
|
|
|
|
|
"F", # Pyflakes
|
|
|
|
|
"I", # isort
|
|
|
|
|
"B", # flake8-bugbear
|
|
|
|
|
"C4", # flake8-comprehensions
|
|
|
|
|
"UP", # pyupgrade
|
|
|
|
|
"ARG", # flake8-unused-arguments
|
|
|
|
|
"SIM", # flake8-simplify
|
|
|
|
|
"TCH", # flake8-type-checking
|
|
|
|
|
"PTH", # flake8-use-pathlib
|
|
|
|
|
"PL", # Pylint
|
|
|
|
|
"RUF", # Ruff-specific
|
|
|
|
|
]
|
|
|
|
|
|
2025-12-24 04:23:16 +01:00
|
|
|
# Lazy imports to avoid circular dependencies
|
2025-12-12 18:08:06 +01:00
|
|
|
[tool.ruff.lint.per-file-ignores]
|
2026-05-11 02:46:54 +02:00
|
|
|
# MCP tool surfaces ARE the LLM-facing contract — every parameter must be
|
|
|
|
|
# top-level + typed so the SDK exposes it as a discrete schema field with
|
|
|
|
|
# enum constraints. Bundling into a dataclass would hide enum hints from
|
|
|
|
|
# the LLM and bring back invented values like nature='standard'.
|
|
|
|
|
"roboco/mcp/**/*.py" = ["PLC0415", "PLR0913"]
|
2025-12-13 05:53:19 +01:00
|
|
|
"roboco/services/*.py" = ["PLC0415"]
|
2026-05-11 05:43:01 +02:00
|
|
|
# Gateway methods are typed verb surfaces — agent-facing kwargs reflect the
|
|
|
|
|
# verb contract (session topic, channel, relationship type, etc.). Bundling
|
|
|
|
|
# into a dataclass hides the field-by-field schema the LLM needs at the
|
|
|
|
|
# tool layer; we accept the >5 kwarg signatures here for the same reason
|
|
|
|
|
# they're accepted in `roboco/mcp/**`.
|
|
|
|
|
"roboco/services/gateway/**/*.py" = ["PLC0415", "PLR0913"]
|
2025-12-27 21:53:38 +01:00
|
|
|
"roboco/api/routes/*.py" = ["PLC0415"]
|
2026-06-11 18:16:20 +02:00
|
|
|
# deps.py is the DI wiring hub; it defers a few service imports to call time
|
|
|
|
|
# to avoid import cycles with the modules it wires (same rationale as above).
|
|
|
|
|
"roboco/api/deps.py" = ["PLC0415"]
|
2025-12-28 19:52:01 +01:00
|
|
|
"roboco/runtime/*.py" = ["PLC0415"]
|
2026-06-19 09:15:01 +02:00
|
|
|
# PTH119: _grok_usage_json sanitizes the agent id with os.path.basename — the
|
|
|
|
|
# path-injection sanitizer CodeQL's query models; the pathlib equivalent
|
|
|
|
|
# (Path(...).name) is not recognized by that query, so we keep os.path here.
|
|
|
|
|
"roboco/runtime/orchestrator.py" = ["PTH119"]
|
2026-06-09 17:08:34 +02:00
|
|
|
# The intake driver/entrypoint lazily import the heavy `claude-agent-sdk` (and
|
|
|
|
|
# uvicorn) so the modules import without those installed and don't pay the cost
|
|
|
|
|
# until a live container runs them — same rationale as the dirs above.
|
|
|
|
|
"roboco/agent_sdk/*.py" = ["PLC0415"]
|
2026-05-11 02:15:47 +02:00
|
|
|
# Lifecycle validators: foundation/_validate_lifecycle is imported from the
|
|
|
|
|
# bottom of policy/lifecycle.py at module-load time, so the validators must
|
|
|
|
|
# defer their inverse imports until call time to avoid a cycle.
|
|
|
|
|
"roboco/foundation/_validate_lifecycle.py" = ["PLC0415"]
|
2026-06-22 12:37:46 +02:00
|
|
|
# The conventions validator loads tree-sitter grammars lazily, per language, so
|
|
|
|
|
# the package imports without tree-sitter present and a missing grammar fails
|
|
|
|
|
# loud at call time (GrammarUnavailable) instead of crashing the import.
|
|
|
|
|
"roboco/conventions/grammars.py" = ["PLC0415"]
|
|
|
|
|
# The conventions ambient-layer resolver defers its config + ConventionsService
|
|
|
|
|
# imports so the prompt-composition utility stays decoupled from the heavy
|
|
|
|
|
# service graph (it loads at every agent spawn).
|
|
|
|
|
"roboco/agents/factories/_base.py" = ["PLC0415"]
|
2026-06-15 20:47:41 +02:00
|
|
|
# Test fixtures that reload modules to test env-var-at-import-time behavior.
|
|
|
|
|
# ARG002: ApiClient-subclassing fakes must keep the superclass parameter names
|
|
|
|
|
# for mypy's override check, so unused override-stub args can't be renamed.
|
|
|
|
|
"tests/unit/mcp_servers/*.py" = ["PLC0415", "ARG002"]
|
2026-06-14 13:43:46 +02:00
|
|
|
# Abstract-method stubs in test helpers: parameters must match the superclass
|
|
|
|
|
# signature for keyword-argument compatibility (mypy override check), but the
|
|
|
|
|
# stub bodies are empty — ARG002 would require renaming them, which breaks mypy.
|
|
|
|
|
"tests/unit/services/test_optimal_grounding.py" = ["ARG002"]
|
2025-12-12 18:08:06 +01:00
|
|
|
|
2025-12-10 02:49:54 +01:00
|
|
|
# =============================================================================
|
|
|
|
|
# MyPy Configuration
|
|
|
|
|
# =============================================================================
|
|
|
|
|
[tool.mypy]
|
2025-12-10 17:35:43 +01:00
|
|
|
python_version = "3.13"
|
2025-12-10 02:49:54 +01:00
|
|
|
warn_return_any = true
|
2025-12-10 17:35:43 +01:00
|
|
|
warn_unused_configs = true
|
2025-12-10 02:49:54 +01:00
|
|
|
disallow_untyped_defs = true
|
|
|
|
|
disallow_incomplete_defs = true
|
|
|
|
|
check_untyped_defs = true
|
|
|
|
|
disallow_untyped_decorators = true
|
|
|
|
|
no_implicit_optional = true
|
2025-12-10 17:35:43 +01:00
|
|
|
strict_optional = true
|
2025-12-13 05:53:19 +01:00
|
|
|
warn_redundant_casts = true
|
2025-12-10 17:35:43 +01:00
|
|
|
warn_unused_ignores = true
|
|
|
|
|
warn_no_return = true
|
|
|
|
|
warn_unreachable = true
|
2025-12-11 01:05:20 +01:00
|
|
|
exclude = ["vulture_whitelist.py", ".venv", "alembic"]
|
2025-12-10 02:49:54 +01:00
|
|
|
|
|
|
|
|
plugins = ["pydantic.mypy"]
|
|
|
|
|
|
|
|
|
|
[[tool.mypy.overrides]]
|
|
|
|
|
module = [
|
|
|
|
|
"redis.*",
|
|
|
|
|
"anthropic.*",
|
2025-12-13 05:50:34 +01:00
|
|
|
"toon.*",
|
2025-12-28 19:52:01 +01:00
|
|
|
"sse_starlette.*",
|
2026-05-02 03:11:49 +02:00
|
|
|
"asyncpg.*",
|
2026-06-09 17:08:34 +02:00
|
|
|
"claude_agent_sdk.*", # third-party SDK, ships no type stubs
|
2025-12-10 02:49:54 +01:00
|
|
|
]
|
|
|
|
|
ignore_missing_imports = true
|
|
|
|
|
|
|
|
|
|
[tool.pydantic-mypy]
|
|
|
|
|
init_forbid_extra = true
|
|
|
|
|
init_typed = true
|
|
|
|
|
warn_required_dynamic_aliases = true
|
|
|
|
|
|
|
|
|
|
# =============================================================================
|
|
|
|
|
# Pytest Configuration
|
|
|
|
|
# =============================================================================
|
|
|
|
|
[tool.pytest.ini_options]
|
|
|
|
|
asyncio_mode = "auto"
|
2025-12-10 17:35:43 +01:00
|
|
|
testpaths = ["tests"]
|
|
|
|
|
python_files = ["test_*.py"]
|
|
|
|
|
asyncio_default_fixture_loop_scope = "function"
|
|
|
|
|
addopts = "--cov=roboco --cov-report=term-missing"
|
2026-06-12 23:51:45 +02:00
|
|
|
markers = [
|
|
|
|
|
"asyncio: mark tests as async",
|
|
|
|
|
"slow: marks tests as slow",
|
|
|
|
|
"integration: marks tests as integration tests",
|
|
|
|
|
"unit: marks tests as unit tests",
|
|
|
|
|
]
|
2026-05-05 03:19:43 +02:00
|
|
|
|
|
|
|
|
[tool.coverage.run]
|
2026-05-06 21:02:31 +02:00
|
|
|
# Coverage core. Python 3.12+ supports sys.monitoring; the legacy `pytrace`
|
|
|
|
|
# core loses trace events across `await` boundaries on 3.13, under-counting
|
|
|
|
|
# every async route by ~30%. `sysmon` is the only core that gives accurate
|
|
|
|
|
# coverage for async route handlers.
|
|
|
|
|
core = "sysmon"
|
2026-05-05 03:19:43 +02:00
|
|
|
# Modules excluded from the coverage gate because they require live
|
|
|
|
|
# infrastructure (Ollama, real audio/video stacks, real workspaces,
|
|
|
|
|
# Docker daemon, Claude Code CLI) that the unit-coverage gate does not
|
|
|
|
|
# provision. They're covered by dedicated integration runs (smoke tests
|
|
|
|
|
# on the NAS) rather than the unit-coverage threshold.
|
|
|
|
|
omit = [
|
|
|
|
|
# RAG / proactive context — needs Ollama + real embedding model.
|
|
|
|
|
"roboco/services/proactive.py",
|
|
|
|
|
"roboco/services/optimal.py",
|
|
|
|
|
"roboco/services/optimal_brain/*",
|
|
|
|
|
# Audio transcription — needs Whisper-class model.
|
|
|
|
|
"roboco/services/transcription.py",
|
|
|
|
|
# Agent classes — instantiated by the orchestrator when spawning
|
|
|
|
|
# Docker containers running the Claude CLI. No usable unit-test
|
|
|
|
|
# surface; integration coverage is the smoke run.
|
|
|
|
|
"roboco/agents/*",
|
|
|
|
|
"roboco/agent_sdk/*",
|
|
|
|
|
# Container orchestration — drives Docker daemon, agent spawning,
|
|
|
|
|
# health/dispatch loops. Covered by smoke runs.
|
|
|
|
|
"roboco/runtime/orchestrator.py",
|
|
|
|
|
# MCP server entry points — modeled around the Claude CLI's STDIO
|
|
|
|
|
# MCP transport and only meaningful when running inside an agent
|
|
|
|
|
# container with the orchestrator reachable. Their _post() bridges
|
|
|
|
|
# ARE unit-tested separately (test_envelope_on_4xx, test_flow_server,
|
|
|
|
|
# test_do_server) — just not via direct module import here.
|
|
|
|
|
"roboco/mcp/*",
|
|
|
|
|
# WebSocket route — needs a running ASGI app + WS client.
|
|
|
|
|
"roboco/api/websocket.py",
|
|
|
|
|
# Event stream bus — wraps Redis Streams; tested via integration only.
|
|
|
|
|
"roboco/events/stream_bus.py",
|
|
|
|
|
# GitService — runs `git` subprocesses against per-agent workspaces.
|
|
|
|
|
# Unit-testable surface is < 5% of the module; covered via the
|
|
|
|
|
# _StubGit-based real-DB integration test + live smoke runs.
|
|
|
|
|
"roboco/services/git.py",
|
|
|
|
|
"roboco/services/workspace.py",
|
|
|
|
|
# Notification delivery — Redis Streams + push to MCP transport.
|
|
|
|
|
"roboco/services/notification_delivery.py",
|
|
|
|
|
# CLI entry point.
|
|
|
|
|
"roboco/cli.py",
|
|
|
|
|
# Auto-generated migrations.
|
|
|
|
|
"alembic/*",
|
|
|
|
|
]
|
2025-12-10 02:49:54 +01:00
|
|
|
|
2025-12-10 17:35:43 +01:00
|
|
|
# =============================================================================
|
|
|
|
|
# Vulture Configuration
|
|
|
|
|
# =============================================================================
|
|
|
|
|
[tool.vulture]
|
2025-12-10 17:37:24 +01:00
|
|
|
paths = ["roboco", "tests", "vulture_whitelist.py"]
|
2025-12-11 01:05:20 +01:00
|
|
|
exclude = ["**/conftest.py", ".venv", "alembic"]
|
2025-12-10 17:35:43 +01:00
|
|
|
min_confidence = 100
|
|
|
|
|
ignore_decorators = [
|
|
|
|
|
"@app.route",
|
|
|
|
|
"@app.get",
|
|
|
|
|
"@app.post",
|
|
|
|
|
"@app.put",
|
|
|
|
|
"@app.delete",
|
|
|
|
|
"@app.patch",
|
|
|
|
|
"@pytest.fixture",
|
|
|
|
|
"@pytest.mark.*",
|
|
|
|
|
"@validator",
|
|
|
|
|
"@root_validator",
|
|
|
|
|
"@field_validator",
|
|
|
|
|
"@model_validator",
|
2025-12-10 02:49:54 +01:00
|
|
|
]
|
2025-12-10 17:35:43 +01:00
|
|
|
ignore_names = [
|
|
|
|
|
"test_*",
|
|
|
|
|
"Test*",
|
|
|
|
|
"cleanup_*",
|
|
|
|
|
"mock_*",
|
|
|
|
|
"expected_*",
|
|
|
|
|
"exc_*",
|
|
|
|
|
"__*__",
|
|
|
|
|
"Config",
|
|
|
|
|
"Field",
|
|
|
|
|
]
|
|
|
|
|
sort_by_size = true
|
2025-12-10 02:49:54 +01:00
|
|
|
|
2025-12-10 17:35:43 +01:00
|
|
|
# =============================================================================
|
|
|
|
|
# Bandit Configuration
|
|
|
|
|
# =============================================================================
|
|
|
|
|
[tool.bandit]
|
2026-04-21 17:48:45 +02:00
|
|
|
skips = []
|
2025-12-11 01:05:20 +01:00
|
|
|
exclude_dirs = ["tests", ".venv", "vulture_whitelist.py", "alembic"]
|
2025-12-10 17:35:43 +01:00
|
|
|
severity = "medium"
|
|
|
|
|
|
|
|
|
|
# =============================================================================
|
|
|
|
|
# Radon Configuration
|
|
|
|
|
# =============================================================================
|
|
|
|
|
[tool.radon]
|
2025-12-11 01:05:20 +01:00
|
|
|
exclude = "tests/*,.venv/*,vulture_whitelist.py,alembic/*"
|
2025-12-10 17:35:43 +01:00
|
|
|
cc_min = "C"
|
|
|
|
|
mi_min = "A"
|
|
|
|
|
no_assert = false
|
|
|
|
|
show_closures = true
|
|
|
|
|
total_average = true
|
|
|
|
|
|
|
|
|
|
# =============================================================================
|
|
|
|
|
# Xenon Configuration
|
|
|
|
|
# =============================================================================
|
|
|
|
|
[tool.xenon]
|
|
|
|
|
max_absolute = "B"
|
|
|
|
|
max_modules = "A"
|
|
|
|
|
max_average = "A"
|
2025-12-11 01:05:20 +01:00
|
|
|
exclude = ["tests/*", ".venv/*", "vulture_whitelist.py", "alembic/*"]
|
2025-12-10 17:35:43 +01:00
|
|
|
ignore = []
|
|
|
|
|
|
|
|
|
|
# =============================================================================
|
|
|
|
|
# Deptry Configuration
|
|
|
|
|
# =============================================================================
|
|
|
|
|
[tool.deptry]
|
2025-12-11 01:05:20 +01:00
|
|
|
exclude = ["tests", ".venv", "vulture_whitelist.py", "alembic"]
|
2025-12-10 17:35:43 +01:00
|
|
|
extend_exclude = ["conftest.py", "setup.py"]
|
2025-12-10 17:37:24 +01:00
|
|
|
known_first_party = ["roboco"]
|
2025-12-13 13:25:37 +01:00
|
|
|
|
2025-12-13 18:09:23 +01:00
|
|
|
[tool.deptry.per_rule_ignores]
|
|
|
|
|
# DEP002: Dependencies not directly imported but used at runtime or via CLI
|
|
|
|
|
DEP002 = [
|
|
|
|
|
# Runtime server/driver dependencies (used by frameworks, not imported)
|
|
|
|
|
"uvicorn",
|
|
|
|
|
"websockets",
|
|
|
|
|
"asyncpg",
|
|
|
|
|
"hiredis",
|
|
|
|
|
"python-multipart",
|
|
|
|
|
# Database migrations (CLI tool)
|
|
|
|
|
"alembic",
|
|
|
|
|
# Auth libraries (used via passlib[bcrypt], python-jose[cryptography])
|
|
|
|
|
"python-jose",
|
|
|
|
|
"passlib",
|
|
|
|
|
# LLM utilities (embeddings/token counting)
|
|
|
|
|
"openai",
|
|
|
|
|
"tiktoken",
|
|
|
|
|
# Retry logic (used in production services)
|
|
|
|
|
"tenacity",
|
|
|
|
|
# Dev tools (CLI, not imported)
|
|
|
|
|
"pytest",
|
|
|
|
|
"pytest-asyncio",
|
|
|
|
|
"pytest-cov",
|
|
|
|
|
"pytest-xdist",
|
|
|
|
|
"factory-boy",
|
|
|
|
|
"faker",
|
|
|
|
|
"ruff",
|
|
|
|
|
"mypy",
|
|
|
|
|
"vulture",
|
|
|
|
|
"bandit",
|
|
|
|
|
"pip-audit",
|
|
|
|
|
"radon",
|
|
|
|
|
"xenon",
|
|
|
|
|
"deptry",
|
2026-05-05 03:19:43 +02:00
|
|
|
# CLI tool — invoked as `lint-imports` from the Makefile / quality gate
|
|
|
|
|
"import-linter",
|
2025-12-13 18:09:23 +01:00
|
|
|
"ipython",
|
|
|
|
|
"rich",
|
|
|
|
|
# Type stubs (used by mypy)
|
|
|
|
|
"types-passlib",
|
|
|
|
|
"types-python-jose",
|
2026-06-22 12:37:46 +02:00
|
|
|
"types-PyYAML",
|
2025-12-13 18:09:23 +01:00
|
|
|
# Documentation (CLI tools)
|
|
|
|
|
"mkdocs",
|
|
|
|
|
"mkdocs-material",
|
|
|
|
|
"mkdocstrings",
|
2026-06-22 15:53:00 +02:00
|
|
|
"pymarkdownlnt",
|
2025-12-13 18:09:23 +01:00
|
|
|
]
|
|
|
|
|
# DEP003: Starlette is a transitive dep of FastAPI, but BaseHTTPMiddleware is needed
|
|
|
|
|
DEP003 = ["starlette"]
|
|
|
|
|
|
2025-12-13 13:25:37 +01:00
|
|
|
[dependency-groups]
|
|
|
|
|
dev = [
|
2026-06-15 02:41:30 +02:00
|
|
|
"pytest>=9.1.0",
|
|
|
|
|
"pytest-asyncio>=1.4.0",
|
2026-05-02 03:11:49 +02:00
|
|
|
"pytest-cov>=7.1.0",
|
2025-12-13 13:25:37 +01:00
|
|
|
]
|
2026-05-02 03:11:49 +02:00
|
|
|
|
|
|
|
|
# =============================================================================
|
|
|
|
|
# Import Linter (architectural boundaries)
|
|
|
|
|
# =============================================================================
|
|
|
|
|
[tool.importlinter]
|
|
|
|
|
root_package = "roboco"
|
|
|
|
|
|
|
|
|
|
[[tool.importlinter.contracts]]
|
|
|
|
|
name = "Gateway layer must not import from API routes or MCP servers"
|
|
|
|
|
type = "forbidden"
|
|
|
|
|
source_modules = ["roboco.services.gateway"]
|
|
|
|
|
forbidden_modules = ["roboco.api.routes", "roboco.mcp"]
|
|
|
|
|
|
|
|
|
|
[[tool.importlinter.contracts]]
|
|
|
|
|
name = "Services must not import from API routes"
|
|
|
|
|
type = "forbidden"
|
|
|
|
|
source_modules = ["roboco.services"]
|
|
|
|
|
forbidden_modules = ["roboco.api.routes"]
|
|
|
|
|
|
|
|
|
|
# =============================================================================
|
|
|
|
|
# Roboco Commit Validator
|
|
|
|
|
# =============================================================================
|
|
|
|
|
[tool.roboco.commits]
|
|
|
|
|
subject_min_chars = 20
|
|
|
|
|
banned_words = ["wip", "tmp", "asdf", "oops", "fix", "update", "change", "stuff", "things"]
|
|
|
|
|
prefer_conventional = true
|