agent-coderag 1.3.4__tar.gz → 1.3.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {agent_coderag-1.3.4/agent_coderag.egg-info → agent_coderag-1.3.5}/PKG-INFO +1 -1
- {agent_coderag-1.3.4 → agent_coderag-1.3.5/agent_coderag.egg-info}/PKG-INFO +1 -1
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/intelligence/openai_embedder.py +13 -1
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/pyproject.toml +1 -1
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_openai_embedder.py +28 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/LICENSE +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/NOTICE +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/README.md +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/agent_coderag.egg-info/SOURCES.txt +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/agent_coderag.egg-info/dependency_links.txt +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/agent_coderag.egg-info/entry_points.txt +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/agent_coderag.egg-info/requires.txt +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/agent_coderag.egg-info/top_level.txt +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/__init__.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/api/__init__.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/api/client.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/api/models.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/core/__init__.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/core/constants.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/core/exceptions.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/core/interfaces.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/core/manager.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/core/models.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/core/utils.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/discovery/__init__.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/discovery/dependency.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/discovery/java_discovery.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/discovery/manager.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/discovery/providers/__init__.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/discovery/providers/base.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/discovery/providers/csharp.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/discovery/providers/go.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/discovery/providers/java.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/discovery/providers/javascript.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/discovery/providers/python.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/discovery/providers/rust.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/entry/__init__.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/entry/cli.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/intelligence/__init__.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/intelligence/distiller.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/intelligence/embedder.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/intelligence/factory.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/parsers/__init__.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/parsers/languages.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/parsers/multi_parser.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/parsers/tree_sitter.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/services/__init__.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/services/config.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/services/discovery_api.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/services/factory.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/services/search.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/services/setup.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/services/sync.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/storage/__init__.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/code_rag/storage/duckdb_impl.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/setup.cfg +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_api_client.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_api_models.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_api_rebuild_wipe.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_cli.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_cli_detailed.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_cli_embeddings.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_cli_json_parity.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_code_rag_simple.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_csharp_discovery_detailed.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_dependency_discovery.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_discovery_manager_detailed.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_discovery_providers_extra.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_discovery_python.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_distiller.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_distiller_config_embedding.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_distiller_extra.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_embedder.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_embedder_detailed.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_embedder_factory.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_embedder_interface.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_embedder_stubs.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_factory_async.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_interfaces.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_js_discovery_detailed.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_languages.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_local_onnx_embedder.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_manager_detailed.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_manager_embeddings.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_manager_extra.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_models.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_multi_parser.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_readme_library_usage.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_readme_offline_embeddings.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_rust_discovery_detailed.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_storage_detailed.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_storage_embeddings.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_sync_worker_errors.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_tree_sitter_parser.py +0 -0
- {agent_coderag-1.3.4 → agent_coderag-1.3.5}/tests/test_utils_detailed.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agent-coderag
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.5
|
|
4
4
|
Summary: Lightweight semantic code search and distillation utility for AI coding agents. It solves the API knowledge gap via real-time local signature extraction and intent analysis without PyTorch. Optimized for token efficiency, it compresses codebase context into compact semantic summaries stored in a local DuckDB vector similarity index.
|
|
5
5
|
Author-email: Igor Boloban <naranor@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agent-coderag
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.5
|
|
4
4
|
Summary: Lightweight semantic code search and distillation utility for AI coding agents. It solves the API knowledge gap via real-time local signature extraction and intent analysis without PyTorch. Optimized for token efficiency, it compresses codebase context into compact semantic summaries stored in a local DuckDB vector similarity index.
|
|
5
5
|
Author-email: Igor Boloban <naranor@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -13,6 +13,18 @@ from .embedder import l2_normalize_rows
|
|
|
13
13
|
logger = logging.getLogger(__name__)
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
def _vector_from_item(item: object) -> list[float]:
|
|
17
|
+
if isinstance(item, dict):
|
|
18
|
+
vec = item.get("embedding")
|
|
19
|
+
else:
|
|
20
|
+
vec = getattr(item, "embedding", None)
|
|
21
|
+
if vec is None:
|
|
22
|
+
raise TypeError("embedding item has no embedding")
|
|
23
|
+
if isinstance(vec, (list, tuple)) and vec and isinstance(vec[0], (list, tuple)):
|
|
24
|
+
vec = vec[0]
|
|
25
|
+
return list(vec)
|
|
26
|
+
|
|
27
|
+
|
|
16
28
|
class OpenAICompatEmbedder(IEmbedder):
|
|
17
29
|
def __init__(
|
|
18
30
|
self,
|
|
@@ -68,7 +80,7 @@ class OpenAICompatEmbedder(IEmbedder):
|
|
|
68
80
|
except Exception as exc:
|
|
69
81
|
raise IntelligenceError(f"Embedding request failed: {exc}") from exc
|
|
70
82
|
try:
|
|
71
|
-
raw = [
|
|
83
|
+
raw = [_vector_from_item(item) for item in response.data]
|
|
72
84
|
except Exception as exc:
|
|
73
85
|
raise IntelligenceError(f"Embedding request failed: {exc}") from exc
|
|
74
86
|
if len(raw) != len(texts):
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "agent-coderag"
|
|
7
|
-
version = "1.3.
|
|
7
|
+
version = "1.3.5"
|
|
8
8
|
description = "Lightweight semantic code search and distillation utility for AI coding agents. It solves the API knowledge gap via real-time local signature extraction and intent analysis without PyTorch. Optimized for token efficiency, it compresses codebase context into compact semantic summaries stored in a local DuckDB vector similarity index."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -156,6 +156,34 @@ def test_bind_rejects_invalid_and_mismatch():
|
|
|
156
156
|
embedder.bind_dimension(4)
|
|
157
157
|
|
|
158
158
|
|
|
159
|
+
@pytest.mark.asyncio
|
|
160
|
+
async def test_aembed_accepts_litellm_dict_items():
|
|
161
|
+
embedder = OpenAICompatEmbedder(api_base="http://e", model="m")
|
|
162
|
+
resp = MagicMock()
|
|
163
|
+
resp.data = [{"embedding": [3.0, 4.0, 0.0], "index": 0, "object": "embedding"}]
|
|
164
|
+
with patch(
|
|
165
|
+
"code_rag.intelligence.openai_embedder.litellm.aembedding",
|
|
166
|
+
new=AsyncMock(return_value=resp),
|
|
167
|
+
):
|
|
168
|
+
rows = await embedder.aembed(["probe"])
|
|
169
|
+
assert len(rows[0]) == 3
|
|
170
|
+
np.testing.assert_allclose(np.linalg.norm(rows[0]), 1.0, rtol=1e-5)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
@pytest.mark.asyncio
|
|
174
|
+
async def test_aembed_flattens_nested_embedding_vector():
|
|
175
|
+
embedder = OpenAICompatEmbedder(api_base="http://e", model="m")
|
|
176
|
+
embedder.bind_dimension(2)
|
|
177
|
+
resp = MagicMock()
|
|
178
|
+
resp.data = [{"embedding": [[1.0, 0.0]]}]
|
|
179
|
+
with patch(
|
|
180
|
+
"code_rag.intelligence.openai_embedder.litellm.aembedding",
|
|
181
|
+
new=AsyncMock(return_value=resp),
|
|
182
|
+
):
|
|
183
|
+
rows = await embedder.aembed(["x"])
|
|
184
|
+
assert len(rows[0]) == 2
|
|
185
|
+
|
|
186
|
+
|
|
159
187
|
@pytest.mark.asyncio
|
|
160
188
|
async def test_aembed_rejects_unparseable_response():
|
|
161
189
|
embedder = OpenAICompatEmbedder(api_base="http://e", model="m")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|