[project] name = "huf" authors = [ { name = "Huf", email = "info@tridz.com"} ] description = "Build and run smart AI agents with tools, chat, and automation directly in the Frappe ecosystem." requires-python = ">=3.10" readme = "README.md" dynamic = ["version"] dependencies = [ # "frappe~=15.0.0" # Installed and managed by bench. "openai-agents", # Upper-bounded below 1.83.8: from ~1.83.8 onward litellm's own PyPI # metadata restricts installs to Python <3.14, and 1.90+ builds a Rust # extension (litellm-rust) whose PyO3 build caps at Python 3.13 — both # break under frappe v16's Python 3.14 requirement. Revisit this ceiling # once litellm ships a Python 3.14-compatible release. # Lower-bound 1.74.7 ensures Moonshot AI and other newer providers are # available in the bundled LiteLLM provider registry. "litellm>=1.74.7,!=1.82.7,!=1.82.8,<1.83.8", "llama-index-core>=0.10.0", "sqlite-vec", "pysqlite3-binary; platform_machine == 'x86_64' and python_version < '3.14'", "httpx>=0.24.0", "chromadb", "llama-index-vector-stores-chroma", # asyncpg>=0.30 is required for CPython 3.14 (frappe v16): 0.29 has no cp314 # build. Without it pip backtracks to old postgres stores pinning asyncpg<0.30. "asyncpg>=0.30", "llama-index-vector-stores-postgres>=0.9.0", "llama-index-vector-stores-weaviate", "llama-index-vector-stores-pinecone", "redisvl>=0.5", "zvec>=0.2.1", "llama-index-vector-stores-faiss", "faiss-cpu", "psycopg[binary]>=3.1.0", "numpy", "pandas", "matplotlib", "tabulate", "pypdf", "python-docx", "markdown", "openpyxl", "python-pptx", "beautifulsoup4", "aiohttp", "pypdfium2>=4.26.0", "serpapi", "youtube-transcript-api", "paramiko>=3.4.0", # Google Chat gateway adapter (huf/ai/gateway_adapters/google_chat.py): # verifies inbound Bearer JWTs against Google's published certs, and # mints an OAuth2 access token from a service account key for # authenticated outbound REST replies. "PyJWT>=2.8.0", "cryptography>=41.0.0", # HTML sanitization for document artifact rendering # (huf.ai.artifacts.render.html). bleach.css_sanitizer.CSSSanitizer needs # tinycss2, pinned here at the version weasyprint (below) also needs — # depend on it directly rather than via bleach's "css" extra, which pins # an older tinycss2 and would downgrade it. "bleach>=6.0", "tinycss2>=1.5.0", # PDF export for document artifacts (huf.ai.artifacts.render.pdf/safety). "weasyprint>=68.0", ] [project.optional-dependencies] # Realtime voice sidecar (huf/ai/voice/sidecar/app.py). Deliberately optional: # the sidecar is a standalone ASGI process an operator opts into running, not # something a normal huf install under gunicorn needs. Install with # `pip install -e ".[realtime]"` on the bench that runs the sidecar. realtime = [ "fastapi", "uvicorn[standard]", ] [build-system] requires = ["flit_core >=3.4,<4"] build-backend = "flit_core.buildapi" # These dependencies are only installed when developer mode is enabled [tool.bench.dev-dependencies] pytest = ">=7.0" [tool.bench.frappe-dependencies] frappe = ">=15.0.0" [tool.ruff] line-length = 110 target-version = "py310" [tool.ruff.lint] select = [ "F", "E", "W", "I", "UP", "B", "RUF", "BLE", "S", "TRY", ] ignore = [ "B017", # assertRaises(Exception) - should be more specific "B018", # useless expression, not assigned to anything "B023", # function doesn't bind loop variable - will have last iteration's value "B904", # raise inside except without from "E101", # indentation contains mixed spaces and tabs "E402", # module level import not at top of file "E501", # line too long "E741", # ambiguous variable name "F401", # "unused" imports "F403", # can't detect undefined names from * import "F405", # can't detect undefined names from * import "F722", # syntax error in forward type annotation "W191", # indentation contains tabs ] typing-modules = ["frappe.types.DF"] [tool.ruff.format] quote-style = "double" indent-style = "tab" docstring-code-format = true [tool.pytest.ini_options] # Bench-less pytest: stub `frappe` only when it is not importable (see scripts/pytest_frappe_stub.py). pythonpath = ["."] addopts = "-p scripts.pytest_frappe_stub"