# SPDX-FileCopyrightText: 2025-2026 CodeNib Contributors # # SPDX-License-Identifier: Apache-2.0 [build-system] requires = ["setuptools>=42", "wheel"] build-backend = "setuptools.build_meta" [project] name = "codenib" version = "0.2.5" description = "A multi-view data system for serving repository context to coding agents" readme = "README.md" requires-python = ">=3.10" license = "Apache-2.0" authors = [{ name = "Zhongming Yu", email = "zhy025@ucsd.edu" }] keywords = [ "code-search", "coding-agents", "model-context-protocol", "repository-context", "static-analysis", ] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Python Modules", ] dependencies = [ "fastapi>=0.100.0", "filelock>=3.0.0", "pydantic>=2.0.0", "pyyaml>=6.0", "rank_bm25>=0.2.2", "regex>=2024.11.6", "rich>=14.0.0", "tree-sitter>=0.25.2", "tree-sitter-language-pack>=1.8.1,<1.9.0", "uvicorn>=0.20.0", ] [project.urls] Documentation = "https://docs.codenib.ai/" Homepage = "https://codenib.ai" Issues = "https://github.com/sysevol-ai/CodeNib/issues" Repository = "https://github.com/sysevol-ai/CodeNib.git" [project.scripts] codenib = "codenib.cli:main" codenib-mcp = "codenib._optional_entrypoints:mcp_main" codenib-web = "codenib.web.app:main" codenib-lsp-provider-validate = "codenib._optional_entrypoints:lsp_provider_validate_main" codenib-lsp-replay-benchmark = "codenib._optional_entrypoints:lsp_replay_benchmark_main" codenib-prebuilt-normalize-graphs = "codenib._optional_entrypoints:prebuilt_normalize_graphs_main" codenib-lsp-agent-ab = "codenib._optional_entrypoints:lsp_agent_ab_main" codenib-lsp-provider-protocol-check = "codenib._optional_entrypoints:lsp_agent_ab_main" codenib-lsp-agent-study-manifest = "codenib._optional_entrypoints:lsp_agent_study_manifest_main" codenib-lsp-agent-study-artifacts = "codenib._optional_entrypoints:lsp_agent_study_artifacts_main" codenib-lsp-agent-study-run = "codenib._optional_entrypoints:lsp_agent_study_run_main" codenib-artifact-bundle = "codenib.eval.artifact_bundle:main" codenib-swe-explore-benchmark = "codenib.eval.benchmarks.swe_explore_runner:main" codenib-contextbench = "codenib._optional_entrypoints:contextbench_main" codenib-arb = "codenib._optional_entrypoints:arb_main" codenib-quality-cost-report = "codenib.eval.reports.quality_cost:main" codenib-serve = "codenib._optional_entrypoints:serving_main" [project.optional-dependencies] auth = [ "keyring>=25.0.0", "requests>=2.25.0", ] grep = [ "requests>=2.25.0", "ripgrep-bin>=15.2.0,<16", ] # LiteLLM imports its MCP gateway while dispatching ordinary function tools. # Select its coupled transport dependencies instead of relying on a test extra. agent = [ "litellm[mcp]>=1.93.0", "openai>=1.0.0", "requests>=2.25.0", ] datasets = [ "datasets>=4.0.0", ] graph = [ "igraph>=0.11.6", "protobuf>=3.20.0", ] mcp = [ "mcp>=2.0.0,<3", ] semantic = [ "einops>=0.8.0", "faiss-cpu>=1.7.0", "numpy>=1.24.0", "openai>=1.0.0", "sentence-transformers>=2.3.0", # The pinned CodeRankEmbed model calls get_extended_attention_mask, # removed in Transformers 5.17. Keep full/test aligned with this bound. "transformers<5.17", ] semantic-remote = [ "faiss-cpu>=1.7.0", "numpy>=1.24.0", "openai>=1.0.0", ] # Speculative serving (``codenib-serve``). fastapi/uvicorn/pydantic are already # core dependencies, so this only adds the streaming transport and the model # runtime. Deliberately kept out of `full`: torch would make the aggregate # extra multi-gigabyte for users who only want retrieval. serving = [ "numpy>=1.24.0", "sse-starlette>=2.0.0", "torch>=2.2.0", "transformers>=5.15.0", ] # Vertex AI backends (``vertex_ai/...`` model strings, via gcloud ADC). # Keep the provider SDK coupled to LiteLLM's own compatibility constraint # instead of maintaining a second, looser google-cloud-aiplatform pin here. vertex = [ "litellm[google,mcp]>=1.93.0", ] zoekt = [ "requests>=2.25.0", ] full = [ "datasets>=4.0.0", "einops>=0.8.0", "faiss-cpu>=1.7.0", "igraph>=0.11.6", "litellm[google,mcp]>=1.93.0", "mcp>=2.0.0,<3", "numpy>=1.24.0", "openai>=1.0.0", "protobuf>=3.20.0", "requests>=2.25.0", "sentence-transformers>=2.3.0", "transformers<5.17", ] dev = [ "black>=22.3.0", "build>=1.2.0", "isort>=5.10.1", "mypy>=0.950", "flake8>=4.0.1", "flake8-bugbear>=24.4.0", # Docs. Keep this list in sync with the `docs` dependency group below. # MkDocs 2.0 drops the plugin system with no migration path, which would # take mkdocstrings and api-autonav with it. "mkdocs<2.0.0", "mkdocs-material>=9.5.0", "mkdocstrings-python>=2.0.0", "mkdocs-api-autonav>=0.4.0", ] test = [ "datasets>=4.0.0", "einops>=0.8.0", "faiss-cpu>=1.7.0", "igraph>=0.11.6", "litellm[mcp]>=1.93.0", "matplotlib>=3.4.0", "mcp>=2.0.0,<3", "numpy>=1.24.0", "openai>=1.0.0", "protobuf>=3.20.0", "pytest>=6.0.0", "pytest-cov>=3.0.0", "pytest-timeout>=2.1.0", "pytest-xdist>=3.0.0", "requests>=2.25.0", "sentence-transformers>=2.3.0", # Lets the serving endpoint tests run in the default tier; tests that # exercise the model runtime are marked `slow`. "sse-starlette>=2.0.0", "tomli>=1.1.0; python_version < '3.11'", "transformers<5.17", ] [dependency-groups] # CI installs only this group for the static documentation build. Keep the # matching packages in the published `dev` extra for `make dev` users. docs = [ "black>=22.3.0", "mkdocs<2.0.0", "mkdocs-material>=9.5.0", "mkdocstrings-python>=2.0.0", "mkdocs-api-autonav>=0.4.0", ] [tool.setuptools] include-package-data = true [tool.setuptools.packages.find] where = ["."] # list of folders that contain the packages (["."] by default) include = ["codenib*"] # package names should match these glob patterns (["*"] by default) exclude = ["eval*"] # exclude packages matching these glob patterns [tool.setuptools.package-data] "codenib.agent" = ["*.cjs"] "codenib.agent.skills" = ["*/config.yaml", "*/skill.md"] "codenib.eval" = ["pricing/*.json"] "codenib.scip_interface" = ["*.proto", "*.yml", "*.sh", "README.md"] [tool.pytest.ini_options] testpaths = ["test"] pythonpath = ["."] norecursedirs = [ "third_party", ".git", ".cache", ".mypy_cache", ".pytest_cache", ".venv", "venv", "env", "build", "dist", ] markers = [ "slow: marks tests that need LLM API, GPU, or HuggingFace downloads (deselect with '-m \"not slow\"')", "integration: marks tests that use external repos but are read-only / parallel-safe (chunkers, fixture-based SCIP)", "integration_serial: marks tests that mutate shared repos (process_instance, git checkout/apply) and must run sequentially", "integration_serial_consumer: marks tests that consume graph.pkl written by integration_serial (run in a separate job after integration-serial via job-level needs, mirroring scip-core)", ] [tool.black] line-length = 88 target-version = ["py310"] extend-exclude = ''' /( build | dist | third_party | docs/_build | .*\.egg-info )/ '''