diff --git a/pyproject.toml b/pyproject.toml index dd461a6..28f7fc6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "king-context" version = "0.4.0" -description = "Local-first, token-efficient documentation server for LLM context injection" +description = "Local-first, token-efficient retrieval layer for AI agents" readme = "README.md" license = { file = "LICENSE" } requires-python = ">=3.10" @@ -9,7 +9,7 @@ authors = [ { name = "deandevz", email = "bruucetscontact@gmail.com" }, ] keywords = [ - "mcp", + "cli", "llm", "documentation", "search", @@ -17,6 +17,7 @@ keywords = [ "claude", "ai-agents", "rag", + "mcp", ] classifiers = [ "Development Status :: 4 - Beta", diff --git a/src/context_cli/cli.py b/src/context_cli/cli.py index b70a27f..54072c0 100644 --- a/src/context_cli/cli.py +++ b/src/context_cli/cli.py @@ -4,6 +4,7 @@ import json import sys from dataclasses import asdict +from importlib.metadata import PackageNotFoundError, version as _package_version from pathlib import Path from context_cli import PROJECT_ROOT, RESEARCH_STORE_DIR, STORE_DIR @@ -26,6 +27,14 @@ SOURCE_CHOICES = ("all", "docs", "research") +def _kctx_version() -> str: + """Return the kctx version string from the installed package metadata.""" + try: + return f"kctx {_package_version('king-context')}" + except PackageNotFoundError: + return "kctx (version unknown)" + + class AmbiguousDocError(RuntimeError): """Raised when a doc slug exists in multiple stores.""" @@ -284,7 +293,7 @@ def _build_parser() -> argparse.ArgumentParser: description="File-based documentation search for AI agents", ) parser.add_argument( - "--version", action="version", version="kctx 0.1.0" + "--version", action="version", version=_kctx_version() ) subparsers = parser.add_subparsers(dest="command") diff --git a/src/king_context/db.py b/src/king_context/db.py index 20e55f6..c74ffa9 100644 --- a/src/king_context/db.py +++ b/src/king_context/db.py @@ -673,7 +673,7 @@ def _rerank_with_embeddings( Note: - Returns None if _embedding_model or _embeddings is None - - Filters results by similarity threshold of 0.5 + - Filters results by similarity threshold of 0.3 - Sorts by similarity descending - Skips sections not found in _section_id_to_idx """