diff --git a/README.md b/README.md index e431e0f..fe565d8 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ pip install java-codebase-rag ``` Python **3.11+** required. After install, `java-codebase-rag --help` should print the CLI groups. +The package includes the CocoIndex lifecycle dependency used by `init`, `increment`, `reprocess`, and `erase`. > **Stability disclaimer.** This package does **not** promise backward compatibility. MCP tool contracts, env vars, Lance/Kuzu schemas, config files, and Python APIs may change without a deprecation period. Track `main` and rebuild indexes when ontology or embedding settings change. @@ -199,7 +200,7 @@ python3 -m venv .venv .venv/bin/pip install -r requirements.txt ``` -The `cocoindex` package is **only** needed for lifecycle commands that run the indexer (`init`, `increment`, `reprocess`, `erase`). Search and MCP navigation work without it. +The `cocoindex` package powers lifecycle commands that run the indexer (`init`, `increment`, `reprocess`, `erase`). Search and MCP navigation do not invoke it directly. The default embedding model is `sentence-transformers/all-MiniLM-L6-v2` (downloaded on first `init`). Override via the `EMBEDDING_MODEL` env var — see [`docs/CONFIGURATION.md` §1](./docs/CONFIGURATION.md#1-environment-variables). diff --git a/pyproject.toml b/pyproject.toml index 74ac683..afa0bc0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "java-codebase-rag" -version = "0.2.0" +version = "0.2.1" description = "MCP server for semantic + structural search over Java codebases" readme = "README.md" requires-python = ">=3.11" @@ -23,6 +23,7 @@ classifiers = [ "Topic :: Software Development :: Libraries", ] dependencies = [ + "cocoindex[lancedb]>=1.0.0a43,<2", "kuzu>=0.11.3,<0.12", "lancedb>=0.25.3,<0.31", "mcp>=1.27.0,<2", diff --git a/tests/test_agent_skills_static.py b/tests/test_agent_skills_static.py index 2aa96c6..d829423 100644 --- a/tests/test_agent_skills_static.py +++ b/tests/test_agent_skills_static.py @@ -16,8 +16,6 @@ from pathlib import Path from typing import get_args -import pytest - from java_ontology import NodeKind from mcp_v2 import ComposedEdgeType, EdgeType @@ -39,6 +37,7 @@ SKILLS_DIR = Path(__file__).resolve().parent.parent / "skills" SKILL_NAME = "explore-codebase" +EXPECTED_SKILL_DIRS = {"explore-codebase", "navigate-codebase"} SKILL_PATH = SKILLS_DIR / SKILL_NAME / "SKILL.md" @@ -208,13 +207,13 @@ def test_readme_exists(self): assert (SKILLS_DIR / "README.md").is_file(), "skills/README.md missing" def test_no_other_skill_dirs(self): - """Only explore-codebase/ should exist as a skill directory.""" + """Only documented consumer skill directories should exist.""" skill_dirs = { p.name for p in SKILLS_DIR.iterdir() if p.is_dir() and (p / "SKILL.md").exists() } - assert skill_dirs == {SKILL_NAME}, ( - f"Expected only skills/{SKILL_NAME}/, found: {skill_dirs}" + assert skill_dirs == EXPECTED_SKILL_DIRS, ( + f"Expected only documented skills {EXPECTED_SKILL_DIRS}, found: {skill_dirs}" ) diff --git a/tests/test_packaging_metadata.py b/tests/test_packaging_metadata.py new file mode 100644 index 0000000..79879a5 --- /dev/null +++ b/tests/test_packaging_metadata.py @@ -0,0 +1,14 @@ +from __future__ import annotations + +import tomllib +from pathlib import Path + + +def test_published_package_installs_cocoindex_for_lifecycle_commands() -> None: + data = tomllib.loads((Path(__file__).resolve().parents[1] / "pyproject.toml").read_text()) + deps = data["project"]["dependencies"] + + cocoindex_deps = [dep for dep in deps if dep.startswith("cocoindex")] + + assert cocoindex_deps + assert any("[lancedb]" in dep for dep in cocoindex_deps)