pi-context-engine 0.3.0 → 0.3.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-context-engine",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Semantic code context for pi: tree-sitter index + hybrid vector/BM25 retrieval + cross-session memory, all local. Port of code-context-engine (MIT, elara-labs) as a native pi extension.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -46,7 +46,6 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "better-sqlite3": "^13.0.3",
49
- "chokidar": "^5.0.0",
50
49
  "sqlite-vec": "^0.1.9",
51
50
  "tree-sitter-wasms": "^0.1.13",
52
51
  "web-tree-sitter": "^0.22.6",
@@ -366,7 +366,11 @@ export async function indexCommits(
366
366
  return { chunks, nodes, edges, headSha };
367
367
  }
368
368
 
369
- /** Per-storage-dir indexing lock so watcher + manual reindex can't interleave. */
369
+ /**
370
+ * Per-storage-dir indexing lock so concurrent reindex runs (auto-index kick,
371
+ * lazy search kick, manual /context-index; plus a future file watcher, #12)
372
+ * can't interleave.
373
+ */
370
374
  const pipelineLocks = new Map<string, Promise<unknown>>();
371
375
 
372
376
  export async function runIndexing(
@@ -531,7 +535,8 @@ async function runIndexingLocked(
531
535
  const underScope = (p: string): boolean => (rel === "" ? true : p === rel || p.startsWith(`${rel}/`));
532
536
  purgeIndexed(Object.keys(manifest.fileEntries).filter((p) => underScope(p) && !yielded.has(p)));
533
537
  } else {
534
- // Watcher deletion path: prune instead of erroring out.
538
+ // Target vanished between runs (deleted file, or a branch switch removed it):
539
+ // prune instead of erroring out.
535
540
  const rel = path.relative(projectDir, target).replace(/\\/g, "/");
536
541
  if (manifest.getHash(rel) !== undefined) {
537
542
  backend.deleteByFiles([rel]);