[build-system] requires = ["setuptools>=68.0", "wheel"] build-backend = "setuptools.build_meta" [project] name = "cosmergon-agent" dynamic = ["version"] description = "Python SDK for the Cosmergon Agent Economy" readme = "README.md" license = {text = "MIT"} requires-python = ">=3.10" authors = [ {name = "RKO Consult UG", email = "contact@cosmergon.de"}, ] 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 :: Games/Entertainment :: Simulation", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Environment :: Console", "Operating System :: OS Independent", "Typing :: Typed", "Framework :: AsyncIO", ] keywords = ["ai", "agents", "mcp", "tool", "economy", "benchmark", "llm", "simulation", "conway", "autonomous", "trading"] dependencies = [ "httpx>=0.25.0", "tomli>=2.0; python_version < '3.11'", "tomli-w>=1.0", ] [project.scripts] cosmergon-agent = "cosmergon_agent.cli:main" cosmergon-dashboard = "cosmergon_agent.dashboard:main" cosmergon-mcp = "cosmergon_agent.mcp:run" [project.optional-dependencies] dashboard = [ "textual>=0.70.0", ] # U5 (#232 K4, 2026-09-05): every product beyond the client is an extra. # `pip install cosmergon-agent` imports client + MCP server with httpx alone. langchain = [ "langchain-core>=0.1", ] # The MCP server speaks JSON-RPC over stdio by hand — no extra dependency. # The extra exists so `cosmergon-agent[mcp]` is a valid, documented surface. mcp = [] dev = [ "pytest>=7.4", "pytest-asyncio>=0.23", "pytest-cov>=4.1", "ruff>=0.3", "mypy>=1.9", "pre-commit>=3.6", "textual>=0.70.0", # für lokale Dashboard-Entwicklung und Tests ] [project.urls] Homepage = "https://cosmergon.com" Documentation = "https://cosmergon.com/getting-started.html" Repository = "https://github.com/rkocosmergon/cosmergon-agent" "Bug Tracker" = "https://github.com/rkocosmergon/cosmergon-agent/issues" Changelog = "https://github.com/rkocosmergon/cosmergon-agent/blob/main/CHANGELOG.md" [tool.setuptools.dynamic] version = {attr = "cosmergon_agent.__version__"} [tool.setuptools.package-data] cosmergon_agent = ["py.typed"] [tool.ruff] line-length = 100 target-version = "py310" [tool.ruff.lint] select = [ "E", # pycodestyle errors "W", # pycodestyle warnings "F", # pyflakes "I", # isort "N", # pep8-naming "UP", # pyupgrade "B", # flake8-bugbear "S", # flake8-bandit (security) "RUF", # ruff-specific "SIM", # flake8-simplify "C4", # flake8-comprehensions "PIE", # flake8-pie (misc code smells) "RET", # flake8-return "PERF", # perflint (performance anti-patterns) "T20", # flake8-print (print in library code) "FURB", # refurb (modernisation) ] ignore = [ "S110", # try-except-pass — intentional for non-fatal ops (config write, message fetch) "S311", # random.random() — fine for backoff jitter, not crypto "S104", # 0.0.0.0 binding — intentional for webhook listener "SIM105", # contextlib.suppress — try-except-pass is explicit enough for our use cases "SIM117", # nested with — httpx stream() requires it for proper cleanup "PERF203", # try-except in loop — cell parsing, negligible overhead "PERF401", # list.extend vs append — micro-optimisation, readability wins ] [tool.ruff.lint.per-file-ignores] "src/cosmergon_agent/cli.py" = ["T201"] # CLI: print() is user-facing output "src/cosmergon_agent/dashboard.py" = ["T201"] # Dashboard: print() for terminal output # S306: `assert` IS the test vocabulary — flake8-bandit's S101 targets asserts in # shipped code, where a `python -O` run would silently drop them. In tests they are # the assertion mechanism itself; pytest even rewrites them. Without this rule ruff # reported 175 findings on `tests/`, which is how a linter stops being read at all. "tests/*" = ["S101"] [tool.mypy] python_version = "3.10" disallow_untyped_defs = true warn_return_any = true no_implicit_optional = true [tool.pytest.ini_options] asyncio_mode = "auto" testpaths = ["tests"] addopts = [ "--cov=src/cosmergon_agent", "--cov-report=term-missing", "--cov-fail-under=60", # poll_loop + langchain need integration tests to reach 80% "-v", ] markers = [ "integration: tests that require a running Cosmergon backend", ] [tool.coverage.run] source = ["src/cosmergon_agent"] omit = ["src/cosmergon_agent/dashboard.py"] # Textual UI — requires real terminal [tool.coverage.report] exclude_lines = [ "pragma: no cover", "if TYPE_CHECKING:", "raise NotImplementedError", ]