mirror of
https://github.com/turnstonelabs/turnstone.git
synced 2026-08-12 23:12:23 -06:00
210 lines
7.0 KiB
TOML
210 lines
7.0 KiB
TOML
[build-system]
|
|
requires = ["hatchling>=1.29"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "turnstone"
|
|
version = "1.7.0a2"
|
|
description = "Multi-node AI orchestration platform with tool use, agent routing, and cluster simulation."
|
|
readme = "README.md"
|
|
license = "Apache-2.0"
|
|
license-files = ["LICENSE", "NOTICE", "THIRD-PARTY-NOTICES"]
|
|
requires-python = ">=3.11"
|
|
authors = [{name = "Patrick Buckley", email = "buckleypm@gmail.com"}]
|
|
keywords = ["ai", "chat", "llm", "agent", "tools", "openai"]
|
|
classifiers = [
|
|
"Development Status :: 5 - Production/Stable",
|
|
"Environment :: Console",
|
|
"Intended Audience :: Developers",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
]
|
|
dependencies = [
|
|
"openai>=2.37",
|
|
"anthropic>=0.108", # claude-fable-5 support; hard runtime floor is 0.105 (mid-conversation system blocks)
|
|
"httpx>=0.28",
|
|
"mcp>=1.27,<2", # v2 is a breaking rewrite (2.0.0a1 live 2026-06-11; stable ~2026-07-27) — streamablehttp_client removed, 2-tuple transport, snake_case types; migrate deliberately
|
|
"starlette>=1.3.1", # CVE-2026-54282 (path->authority host spoof) + CVE-2026-54283 (url-encoded form DoS); supersedes the PYSEC-2026-161 host-header path-injection floor
|
|
"uvicorn>=0.34",
|
|
"sse-starlette>=2.0",
|
|
"httpx-sse>=0.4",
|
|
"pydantic>=2.0",
|
|
"pydantic-settings>=2.14.2", # GHSA-4xgf-cpjx-pc3j: <2.14.2 advisory; pinned as a security floor for pip-audit
|
|
|
|
"sqlalchemy>=2.0",
|
|
"alembic>=1.14",
|
|
"psycopg[binary]>=3.2",
|
|
"croniter>=3.0",
|
|
"structlog>=24.1",
|
|
"PyJWT>=2.8",
|
|
"bcrypt>=4.0",
|
|
"cryptography>=48.0.1", # GHSA-537c-gmf6-5ccf: PyPI wheels <48.0.1 bundle a vulnerable statically-linked OpenSSL (2026-06-09 secadv)
|
|
"lacme>=1.0.5",
|
|
"python-frontmatter>=1.0",
|
|
"pypdfium2>=4", # PDF text-extract + rasterize for models without native PDF input (core/pdf.py)
|
|
"pillow>=10", # PNG encoding for the PDF->images rasterize fallback (vision models, core/pdf.py)
|
|
"altair>=6.0", # standard viz stack: Vega-Lite spec authoring; one spec renders to static SVG (vl-convert) AND interactive ui:// vega-embed panels. Light: pandas/numpy optional via narwhals.
|
|
"vl-convert-python>=1.6", # Vega-Lite -> SVG/PNG, server-side (bundled Rust renderer; no browser/GDAL/chromium). BSD-3 + fully permissive dep closure (OFL font, BSD/MIT/ISC JS).
|
|
]
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/turnstonelabs/turnstone"
|
|
Repository = "https://github.com/turnstonelabs/turnstone"
|
|
Issues = "https://github.com/turnstonelabs/turnstone/issues"
|
|
|
|
[project.optional-dependencies]
|
|
test = ["pytest>=9.0", "pytest-cov>=6.0", "slack-bolt>=1.18", "aiohttp>=3.9"]
|
|
dev = ["ruff>=0.9", "mypy>=1.14"]
|
|
discord = ["discord.py>=2.4"]
|
|
slack = ["slack-bolt>=1.18", "aiohttp>=3.9"]
|
|
all = ["turnstone[discord,slack]"]
|
|
|
|
[project.scripts]
|
|
turnstone = "turnstone.cli:main"
|
|
turnstone-eval = "turnstone.eval:main"
|
|
turnstone-server = "turnstone.server:main"
|
|
turnstone-console = "turnstone.console.server:main"
|
|
turnstone-admin = "turnstone.admin:main"
|
|
turnstone-channel = "turnstone.channels.cli:main"
|
|
turnstone-bootstrap = "turnstone.bootstrap:main"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
include = [
|
|
"turnstone/**/*.py",
|
|
"turnstone/prompts/**/*.md",
|
|
"turnstone/tools/*.json",
|
|
"turnstone/ui/static/*.html",
|
|
"turnstone/ui/static/*.css",
|
|
"turnstone/ui/static/*.js",
|
|
"turnstone/console/static/*.html",
|
|
"turnstone/console/static/*.css",
|
|
"turnstone/console/static/*.js",
|
|
"turnstone/console/static/coordinator/*.html",
|
|
"turnstone/console/static/coordinator/*.css",
|
|
"turnstone/console/static/coordinator/*.js",
|
|
"turnstone/shared_static/*.css",
|
|
"turnstone/shared_static/*.js",
|
|
"turnstone/shared_static/katex-0.17.0/**/*",
|
|
"turnstone/shared_static/hljs-11.11.1/**/*",
|
|
"turnstone/shared_static/mermaid-11.16.0/**/*",
|
|
"turnstone/shared_static/hls-1.6.16/**/*",
|
|
"turnstone/sdk/py.typed",
|
|
"turnstone/deploy/*.yaml",
|
|
"turnstone/deploy/Caddyfile",
|
|
"turnstone/deploy/searxng/settings.yml",
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
markers = [
|
|
"live: requires a running LLM backend",
|
|
"allow_thread_leak: test intentionally leaves a background thread running (opts out of the leaked-thread guard)",
|
|
]
|
|
filterwarnings = [
|
|
# mcp v1 deprecates streamablehttp_client for an entry point whose call
|
|
# shape only settles in v2 — adoption rides the deliberate v2 migration
|
|
# (pin capped <2); silence exactly this message until then.
|
|
"ignore:Use `streamable_http_client` instead",
|
|
# starlette deprecates the httpx-backed TestClient; revisit at the next
|
|
# starlette floor bump.
|
|
"ignore:Using `httpx` with `starlette.testclient` is deprecated",
|
|
]
|
|
|
|
[tool.ruff]
|
|
target-version = "py311"
|
|
line-length = 100
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "W", "I", "N", "UP", "B", "A", "SIM", "TCH"]
|
|
ignore = ["E501"]
|
|
|
|
[tool.ruff.format]
|
|
quote-style = "double"
|
|
|
|
[tool.mypy]
|
|
python_version = "3.11"
|
|
strict = true
|
|
warn_return_any = true
|
|
warn_unused_configs = true
|
|
disallow_untyped_defs = true
|
|
disallow_incomplete_defs = true
|
|
check_untyped_defs = true
|
|
no_implicit_optional = true
|
|
|
|
[tool.coverage.run]
|
|
source = ["turnstone"]
|
|
branch = true
|
|
omit = ["turnstone/*/static/*"]
|
|
|
|
[tool.coverage.report]
|
|
show_missing = true
|
|
skip_empty = true
|
|
exclude_lines = [
|
|
"pragma: no cover",
|
|
"if TYPE_CHECKING",
|
|
"raise NotImplementedError",
|
|
'if __name__ == "__main__"',
|
|
]
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["mcp", "mcp.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["sse_starlette", "sse_starlette.*", "uvicorn", "uvicorn.*", "httpx_sse", "httpx_sse.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["sqlalchemy", "sqlalchemy.*", "alembic", "alembic.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["structlog", "structlog.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["jwt", "jwt.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["anthropic", "anthropic.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["discord", "discord.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["croniter", "croniter.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["frontmatter", "frontmatter.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["lacme", "lacme.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["pypdfium2", "pypdfium2.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["vl_convert", "vl_convert.*"] # Rust wheel, ships no type stubs (altair is typed)
|
|
ignore_missing_imports = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["turnstone.channels.discord.*"]
|
|
disallow_subclassing_any = false
|
|
disallow_untyped_decorators = false
|
|
warn_unused_ignores = false
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["slack_bolt", "slack_bolt.*", "slack_sdk", "slack_sdk.*"]
|
|
ignore_missing_imports = true
|
|
disallow_untyped_calls = false
|