sourcefire 0.3.4__tar.gz → 0.3.6__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.
- {sourcefire-0.3.4/sourcefire.egg-info → sourcefire-0.3.6}/PKG-INFO +1 -1
- {sourcefire-0.3.4 → sourcefire-0.3.6}/pyproject.toml +1 -1
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/cli.py +7 -2
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/indexer/pipeline.py +6 -2
- {sourcefire-0.3.4 → sourcefire-0.3.6/sourcefire.egg-info}/PKG-INFO +1 -1
- {sourcefire-0.3.4 → sourcefire-0.3.6}/LICENSE +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/MANIFEST.in +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/README.md +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/setup.cfg +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/__init__.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/api/__init__.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/api/models.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/api/routes.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/chain/__init__.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/chain/prompts.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/chain/rag_chain.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/config.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/db.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/global_config.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/indexer/__init__.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/indexer/embeddings.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/indexer/language_profiles.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/indexer/metadata.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/init.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/prompts/system.md +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/retriever/__init__.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/retriever/graph.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/retriever/search.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/static/app.js +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/static/index.html +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/static/styles.css +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire/watcher.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire.egg-info/SOURCES.txt +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire.egg-info/dependency_links.txt +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire.egg-info/entry_points.txt +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire.egg-info/requires.txt +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/sourcefire.egg-info/top_level.txt +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/tests/test_config.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/tests/test_graph.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/tests/test_metadata.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/tests/test_prompts.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/tests/test_routes.py +0 -0
- {sourcefire-0.3.4 → sourcefire-0.3.6}/tests/test_search.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sourcefire
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.6
|
|
4
4
|
Summary: Get instant context on any codebase. One command to index, ask questions in plain English, get answers grounded in actual code.
|
|
5
5
|
Author-email: Athar Wani <athar@cravv.com>
|
|
6
6
|
License: MIT
|
|
@@ -54,12 +54,14 @@ def discover_project() -> tuple[Path, Path]:
|
|
|
54
54
|
|
|
55
55
|
current = Path.cwd().resolve()
|
|
56
56
|
while True:
|
|
57
|
+
# Stop BEFORE checking — never use home or root as project
|
|
58
|
+
if current in stop_dirs:
|
|
59
|
+
break
|
|
57
60
|
candidate = current / ".sourcefire"
|
|
58
|
-
# Only accept if it has a config.toml (project-level, not stale/global)
|
|
59
61
|
if candidate.is_dir() and (candidate / "config.toml").is_file():
|
|
60
62
|
return current, candidate
|
|
61
63
|
parent = current.parent
|
|
62
|
-
if parent == current
|
|
64
|
+
if parent == current:
|
|
63
65
|
break
|
|
64
66
|
current = parent
|
|
65
67
|
|
|
@@ -172,6 +174,9 @@ async def lifespan(app: FastAPI):
|
|
|
172
174
|
print("[sourcefire] Checking for changes...")
|
|
173
175
|
stats = run_indexing(collection, config, client=client, full=False)
|
|
174
176
|
|
|
177
|
+
# Use the collection returned by indexing (may be new after reset)
|
|
178
|
+
collection = stats["collection"]
|
|
179
|
+
|
|
175
180
|
print(f"[sourcefire] Indexed: {stats['files']} files, {stats['chunks']} chunks")
|
|
176
181
|
|
|
177
182
|
# Build import graph
|
|
@@ -207,7 +207,10 @@ def run_indexing(
|
|
|
207
207
|
re-index changed/new files, delete removed files.
|
|
208
208
|
|
|
209
209
|
Returns:
|
|
210
|
-
A stats dict with keys: files, chunks, edges, language, import_edges.
|
|
210
|
+
A stats dict with keys: files, chunks, edges, language, import_edges, collection.
|
|
211
|
+
The ``collection`` key holds the (possibly new) ChromaDB collection — callers
|
|
212
|
+
MUST use this instead of their original reference, because full re-index
|
|
213
|
+
deletes and recreates the collection.
|
|
211
214
|
"""
|
|
212
215
|
codebase_path = config.project_dir
|
|
213
216
|
print(f"[pipeline] Scanning codebase at: {codebase_path}")
|
|
@@ -226,7 +229,7 @@ def run_indexing(
|
|
|
226
229
|
print("Run `sourcefire --reinit` to regenerate patterns, or edit .sourcefire/config.toml manually.")
|
|
227
230
|
return {
|
|
228
231
|
"files": 0, "chunks": 0, "edges": 0,
|
|
229
|
-
"language": lang_name, "import_edges": {},
|
|
232
|
+
"language": lang_name, "import_edges": {}, "collection": collection,
|
|
230
233
|
}
|
|
231
234
|
|
|
232
235
|
# Determine which files to process
|
|
@@ -342,6 +345,7 @@ def run_indexing(
|
|
|
342
345
|
"edges": edge_count,
|
|
343
346
|
"language": lang_name,
|
|
344
347
|
"import_edges": file_imports,
|
|
348
|
+
"collection": collection,
|
|
345
349
|
}
|
|
346
350
|
|
|
347
351
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sourcefire
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.6
|
|
4
4
|
Summary: Get instant context on any codebase. One command to index, ask questions in plain English, get answers grounded in actual code.
|
|
5
5
|
Author-email: Athar Wani <athar@cravv.com>
|
|
6
6
|
License: MIT
|
|
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
|