grepmax 0.10.0 → 0.10.2

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.
@@ -77,6 +77,12 @@ exports.watch = new commander_1.Command("watch")
77
77
  return;
78
78
  }
79
79
  if (options.background) {
80
+ // Skip spawn if daemon already running — prevents process accumulation
81
+ // when SessionStart hook fires on every session/clear/resume
82
+ const { isDaemonRunning } = yield Promise.resolve().then(() => __importStar(require("../lib/utils/daemon-client")));
83
+ if (yield isDaemonRunning()) {
84
+ process.exit(0);
85
+ }
80
86
  const logFile = path.join(config_1.PATHS.logsDir, "daemon.log");
81
87
  const out = (0, log_rotate_1.openRotatedLog)(logFile);
82
88
  const child = (0, node_child_process_1.spawn)(process.argv[0], [process.argv[1], "watch", "--daemon"], {
@@ -226,6 +226,16 @@ function initialSync(options) {
226
226
  // Scope checks to this project's paths only
227
227
  const projectKeys = yield metaCache.getKeysWithPrefix(rootPrefix);
228
228
  (0, logger_1.log)("index", `Cached files: ${projectKeys.size}`);
229
+ // Coherence check: if LMDB has entries but LanceDB has no vectors for
230
+ // this project, the vector store was wiped (e.g. compaction failure,
231
+ // manual cleanup). Clear the stale cache so files get re-embedded.
232
+ if (projectKeys.size > 0 && !(yield vectorDb.hasRowsForPath(rootPrefix))) {
233
+ (0, logger_1.log)("index", `Stale cache detected: ${projectKeys.size} cached files but no vectors — clearing cache`);
234
+ for (const key of projectKeys) {
235
+ metaCache.delete(key);
236
+ }
237
+ projectKeys.clear();
238
+ }
229
239
  const modelChanged = (0, index_config_1.checkModelMismatch)(paths.configPath);
230
240
  if (reset || modelChanged) {
231
241
  if (modelChanged) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grepmax",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "author": "Robert Owens <robowens@me.com>",
5
5
  "homepage": "https://github.com/reowens/grepmax",
6
6
  "bugs": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grepmax",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "Semantic code search for Claude Code. Automatically indexes your project and provides intelligent search capabilities.",
5
5
  "author": {
6
6
  "name": "Robert Owens",