xml-pipeline/pyproject.toml
dullfig ce8a9ae0e7 Add Premium Librarian MVP for codebase intelligence
Implements an RLM-powered codebase intelligence system that:
- Ingests git repositories and chunks code intelligently
- Stores chunks in eXist-db for RAG retrieval
- Answers natural language queries using LLM synthesis

New package xml_pipeline/librarian/ with:
- chunker.py: AST-based code chunking (Python, JS/TS, C++)
- ingest.py: Git clone + file walking + chunk storage
- index.py: Structural index building (files, functions, classes)
- query.py: RAG search + LLM synthesis with source citations
- primitives.py: XML payloads (LibrarianIngest, LibrarianQuery, etc.)
- handler.py: Message handlers for organism integration

Also adds GitPython and aiohttp as optional [librarian] dependencies.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 23:07:19 -08:00

208 lines
5.6 KiB
TOML

# pyproject.toml — OSS xml-pipeline library
#
# This is the open-source core: message pump, handlers, LLM abstraction, tools.
# Advanced features (TUI console, LSP, auth) are in OpenBlox (https://openblox.ai).
[build-system]
requires = ["setuptools>=45", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "xml-pipeline"
version = "0.4.0"
description = "Schema-driven XML message bus for multi-agent systems"
readme = "README.md"
requires-python = ">=3.11"
license = {text = "MIT"}
authors = [
{name = "xml-pipeline contributors"},
]
keywords = [
"xml",
"multi-agent",
"message-bus",
"llm",
"pipeline",
"async",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Framework :: AsyncIO",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Distributed Computing",
]
# =============================================================================
# CORE DEPENDENCIES — minimal set for the library
# =============================================================================
dependencies = [
# XML processing & validation
"lxml>=4.9",
# Async streaming pipeline
"aiostream>=0.5",
# Configuration
"pyyaml>=6.0",
# Case conversion (snake_case <-> camelCase)
"pyhumps>=3.0",
# Ed25519 identity keys for signing
"cryptography>=41.0",
# HTTP client for LLM backends
"httpx>=0.27",
# Colored terminal output (minimal, no TUI)
"termcolor>=2.0",
]
# =============================================================================
# OPTIONAL DEPENDENCIES — user opts in
# =============================================================================
[project.optional-dependencies]
# LLM provider SDKs (alternative to raw httpx calls)
anthropic = ["anthropic>=0.39"]
openai = ["openai>=1.0"]
# Tool backends
redis = ["redis>=5.0"] # Distributed key-value store
search = ["duckduckgo-search>=6.0"] # Web search tool
# Premium Librarian (codebase intelligence)
librarian = ["gitpython>=3.1", "aiohttp>=3.9"]
# Console example (optional, for interactive use)
console = ["prompt_toolkit>=3.0"]
# API server (FastAPI + WebSocket)
server = [
"fastapi>=0.109",
"uvicorn[standard]>=0.27",
"websockets>=12.0",
]
# All LLM providers
llm = ["xml-pipeline[anthropic,openai]"]
# All tools
tools = ["xml-pipeline[redis,search,librarian]"]
# Everything (for local development)
all = ["xml-pipeline[llm,tools,console,server]"]
# Testing
test = [
"pytest>=7.0",
"pytest-asyncio>=0.23",
"pytest-cov>=4.0",
]
# Development (linting, type checking)
dev = [
"xml-pipeline[test,all]",
"mypy>=1.8",
"ruff>=0.1",
"types-PyYAML",
]
# =============================================================================
# CLI ENTRY POINTS
# =============================================================================
[project.scripts]
xml-pipeline = "xml_pipeline.cli:main"
xp = "xml_pipeline.cli:main" # Short alias
# =============================================================================
# PROJECT URLS
# =============================================================================
[project.urls]
Homepage = "https://xml-pipeline.org"
Documentation = "https://xml-pipeline.org/docs"
Repository = "https://git.xml-pipeline.org/dullfig/xml-pipeline"
Issues = "https://git.xml-pipeline.org/dullfig/xml-pipeline/issues"
# =============================================================================
# PACKAGE DISCOVERY
# =============================================================================
[tool.setuptools.packages.find]
where = ["."]
include = [
"xml_pipeline*",
"third_party*",
"examples*",
]
exclude = [
"tests*",
"docs*",
]
[tool.setuptools.package-data]
xml_pipeline = [
"schema/*.xsd",
"prompts/*.txt",
]
# =============================================================================
# PYTEST
# =============================================================================
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
testpaths = ["tests"]
python_files = ["test_*.py"]
norecursedirs = [".git", "__pycache__", "*.egg-info", "build", "dist"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests requiring external services",
]
# =============================================================================
# RUFF (linting)
# =============================================================================
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"W", # pycodestyle warnings
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # function call in default argument
]
[tool.ruff.lint.isort]
known-first-party = ["xml_pipeline", "third_party"]
# =============================================================================
# MYPY (type checking)
# =============================================================================
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_ignores = true
disallow_untyped_defs = true
strict_optional = true
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "third_party.*"
ignore_errors = true