Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
[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"
authors = [
{ name = "deandevz", email = "bruucetscontact@gmail.com" },
]
keywords = [
"mcp",
"cli",
"llm",
"documentation",
"search",
"context",
"claude",
"ai-agents",
"rag",
"mcp",
]
classifiers = [
"Development Status :: 4 - Beta",
Expand Down
11 changes: 10 additions & 1 deletion src/context_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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."""

Expand Down Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion src/king_context/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down
Loading