sampler-cli 0.4.2__tar.gz → 0.4.3__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.
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/PKG-INFO +2 -2
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/README.md +1 -1
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/pyproject.toml +1 -1
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/__init__.py +1 -1
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/query/semantic.py +3 -12
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler_cli.egg-info/PKG-INFO +2 -2
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/LICENSE +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/setup.cfg +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/__main__.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/cli/__init__.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/cli/main.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/cli/render.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/config.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/db.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/embeddings.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/indexer/__init__.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/indexer/builder.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/indexer/discover.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/indexer/embedder.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/indexer/imports.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/indexer/parsers/__init__.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/indexer/parsers/base.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/indexer/parsers/go.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/indexer/parsers/python.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/indexer/parsers/typescript.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/indexer/store.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/mcp/__init__.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/mcp/server.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/models.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/query/__init__.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/query/engine.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/viz/__init__.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/viz/bus.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/viz/canvas.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/viz/discover_emit.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/viz/engine.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/viz/events.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/viz/headline.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/viz/layout_algo.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/viz/live.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler/viz/pipeline.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler_cli.egg-info/SOURCES.txt +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler_cli.egg-info/dependency_links.txt +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler_cli.egg-info/entry_points.txt +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler_cli.egg-info/requires.txt +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/src/sampler_cli.egg-info/top_level.txt +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_canvas_graph.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_cli.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_config.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_db.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_discover.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_embeddings.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_events.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_go_parser.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_headline.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_imports.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_index_query.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_python_parser.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_relationships.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_render_bars.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_semantic.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_smoke.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_stale_code.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_typescript_parser.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_viz_engine.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_viz_layout.py +0 -0
- {sampler_cli-0.4.2 → sampler_cli-0.4.3}/tests/test_viz_pipeline.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sampler-cli
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: Token-efficient CLI for indexing and searching code symbols (Python-first, designed for minimal LLM/agent context size)
|
|
5
5
|
Author: Samuel Ignacio Carmona Rodriguez
|
|
6
6
|
License: MIT
|
|
@@ -52,7 +52,7 @@ Dynamic: license-file
|
|
|
52
52
|
|
|
53
53
|
Token-efficient CLI for indexing and searching code symbols across multiple projects.
|
|
54
54
|
|
|
55
|
-
Current version: 0.4.
|
|
55
|
+
Current version: 0.4.3
|
|
56
56
|
|
|
57
57
|
Designed for humans and agents: compact default output, short paths, and low-noise symbol views.
|
|
58
58
|
|
|
@@ -92,7 +92,7 @@ class SemanticEngine:
|
|
|
92
92
|
scored.sort(key=lambda pair: pair[0], reverse=True)
|
|
93
93
|
return scored[:pool]
|
|
94
94
|
|
|
95
|
-
def _hash_scored_candidates(self, query: str, rows: list[dict],
|
|
95
|
+
def _hash_scored_candidates(self, query: str, rows: list[dict], pool: int):
|
|
96
96
|
"""Last-resort backend: deterministic hash fingerprints (no ML, always available)."""
|
|
97
97
|
try:
|
|
98
98
|
import numpy as np
|
|
@@ -101,18 +101,9 @@ class SemanticEngine:
|
|
|
101
101
|
"Semantic search requires numpy. Install with: pip install 'sampler-cli[semantic]'"
|
|
102
102
|
) from exc
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
# ponytail: always derive on-the-fly for hash (cheap+deterministic); precomp only for real providers (avoids all cross-dim crashes when provider switched)
|
|
105
105
|
query_vec = self.embedder.hash_fingerprint_vector(query)
|
|
106
106
|
|
|
107
|
-
if embeddings:
|
|
108
|
-
scored = []
|
|
109
|
-
for row in embeddings:
|
|
110
|
-
vec = np.frombuffer(row["vector"], dtype="float32")
|
|
111
|
-
sim = float(np.dot(query_vec, vec))
|
|
112
|
-
scored.append((sim, row))
|
|
113
|
-
scored.sort(key=lambda pair: pair[0], reverse=True)
|
|
114
|
-
return scored[:pool]
|
|
115
|
-
|
|
116
107
|
if not rows:
|
|
117
108
|
return []
|
|
118
109
|
|
|
@@ -139,7 +130,7 @@ class SemanticEngine:
|
|
|
139
130
|
return tfidf
|
|
140
131
|
|
|
141
132
|
# 3. Hash fingerprint (always works, deterministic local fallback)
|
|
142
|
-
return self._hash_scored_candidates(query, rows,
|
|
133
|
+
return self._hash_scored_candidates(query, rows, pool)
|
|
143
134
|
|
|
144
135
|
def semantic_search(self, query: str, project_name: str | None = None, limit: int = 10) -> list[dict]:
|
|
145
136
|
"""Pure cosine-similarity search over stored symbol embeddings, no graph/text signals."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sampler-cli
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: Token-efficient CLI for indexing and searching code symbols (Python-first, designed for minimal LLM/agent context size)
|
|
5
5
|
Author: Samuel Ignacio Carmona Rodriguez
|
|
6
6
|
License: MIT
|
|
@@ -52,7 +52,7 @@ Dynamic: license-file
|
|
|
52
52
|
|
|
53
53
|
Token-efficient CLI for indexing and searching code symbols across multiple projects.
|
|
54
54
|
|
|
55
|
-
Current version: 0.4.
|
|
55
|
+
Current version: 0.4.3
|
|
56
56
|
|
|
57
57
|
Designed for humans and agents: compact default output, short paths, and low-noise symbol views.
|
|
58
58
|
|
|
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
|