bluera-knowledge 0.28.1 → 0.30.0

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.
@@ -2,7 +2,7 @@ import {
2
2
  createLogger,
3
3
  summarizePayload,
4
4
  truncateForLog
5
- } from "./chunk-WP2GERAJ.js";
5
+ } from "./chunk-B335UOU7.js";
6
6
 
7
7
  // src/crawl/intelligent-crawler.ts
8
8
  import { EventEmitter } from "events";
@@ -916,4 +916,4 @@ export {
916
916
  getCrawlStrategy,
917
917
  IntelligentCrawler
918
918
  };
919
- //# sourceMappingURL=chunk-BYLIDCWD.js.map
919
+ //# sourceMappingURL=chunk-KCI4U6FH.js.map
@@ -2,13 +2,83 @@
2
2
  import { watch } from "chokidar";
3
3
 
4
4
  // src/utils/ignore-patterns.ts
5
- var DEFAULT_IGNORE_DIRS = ["node_modules", ".git", ".bluera", "dist", "build"];
5
+ var DEFAULT_IGNORE_DIRS = [
6
+ // Version control
7
+ ".git",
8
+ ".svn",
9
+ ".hg",
10
+ ".bzr",
11
+ // Package managers & dependencies
12
+ "node_modules",
13
+ "bower_components",
14
+ "jspm_packages",
15
+ "vendor",
16
+ // Build outputs
17
+ "dist",
18
+ "build",
19
+ "out",
20
+ "target",
21
+ // Python
22
+ "__pycache__",
23
+ ".venv",
24
+ "venv",
25
+ ".tox",
26
+ ".mypy_cache",
27
+ ".ruff_cache",
28
+ // Testing & coverage
29
+ ".pytest_cache",
30
+ ".nyc_output",
31
+ "coverage",
32
+ "htmlcov",
33
+ // IDE/editor
34
+ ".idea",
35
+ ".vscode",
36
+ ".vs",
37
+ ".fleet",
38
+ // Framework caches
39
+ ".next",
40
+ ".nuxt",
41
+ ".svelte-kit",
42
+ ".parcel-cache",
43
+ ".turbo",
44
+ // Project-specific
45
+ ".bluera"
46
+ ];
47
+ var DEFAULT_IGNORE_FILE_PATTERNS = [
48
+ // Lock files — conservative set (largest offenders only)
49
+ "package-lock.json",
50
+ "yarn.lock",
51
+ "pnpm-lock.yaml",
52
+ "bun.lockb",
53
+ // Source maps
54
+ "*.map",
55
+ // Test snapshots
56
+ "*.snap",
57
+ // TypeScript build info
58
+ "*.tsbuildinfo",
59
+ // Temp/backup
60
+ "*.tmp",
61
+ "*.temp",
62
+ "*.swp",
63
+ "*.bak",
64
+ "*.orig",
65
+ // OS artifacts
66
+ ".DS_Store",
67
+ "Thumbs.db"
68
+ ];
6
69
  function normalizeGlobPatterns(patterns, includeDefaults = true) {
7
70
  const result = [];
8
71
  if (includeDefaults) {
9
72
  for (const dir of DEFAULT_IGNORE_DIRS) {
10
73
  result.push(`**/${dir}/**`);
11
74
  }
75
+ for (const pattern of DEFAULT_IGNORE_FILE_PATTERNS) {
76
+ if (pattern.startsWith("*")) {
77
+ result.push(`**/${pattern}`);
78
+ } else {
79
+ result.push(`**/${pattern}`);
80
+ }
81
+ }
12
82
  }
13
83
  for (const pattern of patterns) {
14
84
  if (pattern.startsWith("**/") && pattern.endsWith("/**")) {
@@ -32,6 +102,14 @@ function parseIgnorePatternsForScanning(patterns, includeDefaults = true) {
32
102
  for (const dir of DEFAULT_IGNORE_DIRS) {
33
103
  dirs.add(dir);
34
104
  }
105
+ for (const pattern of DEFAULT_IGNORE_FILE_PATTERNS) {
106
+ if (pattern.startsWith("*")) {
107
+ const ext = pattern.slice(1);
108
+ fileMatchers.push((filename) => filename.endsWith(ext));
109
+ } else {
110
+ fileMatchers.push((filename) => filename === pattern);
111
+ }
112
+ }
35
113
  }
36
114
  for (const pattern of patterns) {
37
115
  if (pattern.startsWith("**/") && pattern.endsWith("/**")) {
@@ -173,9 +251,10 @@ var WatchService = class {
173
251
  };
174
252
 
175
253
  export {
254
+ DEFAULT_IGNORE_DIRS,
176
255
  parseIgnorePatternsForScanning,
177
256
  validateStoreModelCompatibility,
178
257
  checkStoreModelCompatibility,
179
258
  WatchService
180
259
  };
181
- //# sourceMappingURL=chunk-H25AEF47.js.map
260
+ //# sourceMappingURL=chunk-N3XYMAU3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/services/watch.service.ts","../src/utils/ignore-patterns.ts","../src/utils/model-validation.ts"],"sourcesContent":["import { watch, type FSWatcher } from 'chokidar';\nimport { normalizeGlobPatterns } from '../utils/ignore-patterns.js';\nimport { validateStoreModelCompatibility } from '../utils/model-validation.js';\nimport type { IndexService } from './index.service.js';\nimport type { EmbeddingEngine } from '../db/embeddings.js';\nimport type { LanceStore } from '../db/lance.js';\nimport type { FileStore, RepoStore } from '../types/store.js';\n\nexport interface WatchServiceOptions {\n ignorePatterns?: readonly string[];\n /** Current embedding model ID for compatibility validation */\n currentModelId?: string;\n}\n\nexport class WatchService {\n private readonly watchers: Map<string, FSWatcher> = new Map();\n private readonly pendingTimeouts: Map<string, NodeJS.Timeout> = new Map();\n private readonly indexService: IndexService;\n private readonly lanceStore: LanceStore;\n private readonly embeddings: EmbeddingEngine;\n private readonly ignorePatterns: readonly string[];\n private readonly currentModelId: string | undefined;\n\n constructor(\n indexService: IndexService,\n lanceStore: LanceStore,\n embeddings: EmbeddingEngine,\n options: WatchServiceOptions = {}\n ) {\n this.indexService = indexService;\n this.lanceStore = lanceStore;\n this.embeddings = embeddings;\n // Use shared utility to normalize patterns to glob format with defaults\n this.ignorePatterns = normalizeGlobPatterns(options.ignorePatterns ?? []);\n this.currentModelId = options.currentModelId;\n }\n\n async watch(\n store: FileStore | RepoStore,\n debounceMs: number,\n onReindex: (() => void) | undefined,\n onError: (error: Error) => void\n ): Promise<void> {\n if (this.watchers.has(store.id)) {\n return Promise.resolve(); // Already watching\n }\n\n let timeout: NodeJS.Timeout | null = null;\n\n const watcher = watch(store.path, {\n ignored: [...this.ignorePatterns],\n persistent: true,\n ignoreInitial: true,\n });\n\n const reindexHandler = (): void => {\n if (timeout) clearTimeout(timeout);\n timeout = setTimeout(() => {\n this.pendingTimeouts.delete(store.id);\n void (async (): Promise<void> => {\n try {\n // Validate model compatibility before incremental indexing\n // If currentModelId is set, check that store was indexed with same model\n if (this.currentModelId !== undefined) {\n validateStoreModelCompatibility(store, { currentModelId: this.currentModelId });\n }\n\n this.lanceStore.setDimensions(await this.embeddings.ensureDimensions());\n await this.lanceStore.initialize(store.id);\n\n // Try incremental indexing first if available, fall back to full indexing\n let useFullReindex = true;\n if (typeof this.indexService.indexStoreIncremental === 'function') {\n const incrementalResult = await this.indexService.indexStoreIncremental(store);\n if (incrementalResult.success) {\n useFullReindex = false;\n }\n }\n\n if (useFullReindex) {\n const fullResult = await this.indexService.indexStore(store);\n if (!fullResult.success) {\n onError(fullResult.error);\n return;\n }\n }\n\n onReindex?.();\n } catch (e) {\n const error = e instanceof Error ? e : new Error(String(e));\n onError(error);\n }\n })();\n }, debounceMs);\n this.pendingTimeouts.set(store.id, timeout);\n };\n\n watcher.on('all', reindexHandler);\n\n watcher.on('error', (e) => {\n const error = e instanceof Error ? e : new Error(String(e));\n onError(error);\n });\n\n this.watchers.set(store.id, watcher);\n return Promise.resolve();\n }\n\n async unwatch(storeId: string): Promise<void> {\n // Clear any pending timeout to prevent timer leak\n const pendingTimeout = this.pendingTimeouts.get(storeId);\n if (pendingTimeout) {\n clearTimeout(pendingTimeout);\n this.pendingTimeouts.delete(storeId);\n }\n\n const watcher = this.watchers.get(storeId);\n if (watcher) {\n await watcher.close();\n this.watchers.delete(storeId);\n }\n }\n\n async unwatchAll(): Promise<void> {\n for (const [id] of this.watchers) {\n await this.unwatch(id);\n }\n }\n}\n","/**\n * Unified ignore pattern handling for consistent behavior across IndexService and WatchService.\n *\n * Pattern normalization ensures the same config patterns work identically whether used\n * for fs.readdir scanning (IndexService) or chokidar watching (WatchService).\n */\n\n/** Default directories to always ignore */\nexport const DEFAULT_IGNORE_DIRS = [\n // Version control\n '.git',\n '.svn',\n '.hg',\n '.bzr',\n // Package managers & dependencies\n 'node_modules',\n 'bower_components',\n 'jspm_packages',\n 'vendor',\n // Build outputs\n 'dist',\n 'build',\n 'out',\n 'target',\n // Python\n '__pycache__',\n '.venv',\n 'venv',\n '.tox',\n '.mypy_cache',\n '.ruff_cache',\n // Testing & coverage\n '.pytest_cache',\n '.nyc_output',\n 'coverage',\n 'htmlcov',\n // IDE/editor\n '.idea',\n '.vscode',\n '.vs',\n '.fleet',\n // Framework caches\n '.next',\n '.nuxt',\n '.svelte-kit',\n '.parcel-cache',\n '.turbo',\n // Project-specific\n '.bluera',\n] as const;\n\n/**\n * Default file patterns to always ignore.\n * Exact names (no wildcard) match by equality; glob patterns (*.ext) match by extension.\n *\n * Note: Language-specific lock files (Pipfile.lock, poetry.lock, Gemfile.lock,\n * composer.lock, Cargo.lock, go.sum) are intentionally excluded from defaults —\n * they may provide useful dependency context for some stores.\n * Users can add them via per-store excludeGlobs.\n */\nexport const DEFAULT_IGNORE_FILE_PATTERNS = [\n // Lock files — conservative set (largest offenders only)\n 'package-lock.json',\n 'yarn.lock',\n 'pnpm-lock.yaml',\n 'bun.lockb',\n // Source maps\n '*.map',\n // Test snapshots\n '*.snap',\n // TypeScript build info\n '*.tsbuildinfo',\n // Temp/backup\n '*.tmp',\n '*.temp',\n '*.swp',\n '*.bak',\n '*.orig',\n // OS artifacts\n '.DS_Store',\n 'Thumbs.db',\n] as const;\n\n/**\n * Normalize patterns to standard glob format for chokidar and micromatch.\n *\n * Transformations:\n * - 'node_modules' → '** /node_modules/**' (directory anywhere in tree)\n * - 'node_modules/**' → '** /node_modules/**' (explicit directory pattern)\n * - '*.min.js' → '**\\/*.min.js' (extension pattern anywhere)\n * - '** /foo/**' → unchanged (already in glob format)\n *\n * @param patterns - User-provided patterns from config\n * @param includeDefaults - Whether to include DEFAULT_IGNORE_DIRS (default: true)\n */\nexport function normalizeGlobPatterns(\n patterns: readonly string[],\n includeDefaults = true\n): string[] {\n const result: string[] = [];\n\n // Add defaults first\n if (includeDefaults) {\n for (const dir of DEFAULT_IGNORE_DIRS) {\n result.push(`**/${dir}/**`);\n }\n // Add default file patterns as file globs (not directory globs)\n for (const pattern of DEFAULT_IGNORE_FILE_PATTERNS) {\n if (pattern.startsWith('*')) {\n // Glob pattern: '*.map' → '**/*.map'\n result.push(`**/${pattern}`);\n } else {\n // Exact filename: 'package-lock.json' → '**/package-lock.json'\n result.push(`**/${pattern}`);\n }\n }\n }\n\n // Process user patterns\n for (const pattern of patterns) {\n if (pattern.startsWith('**/') && pattern.endsWith('/**')) {\n // Already in glob format\n result.push(pattern);\n } else if (pattern.endsWith('/**')) {\n // Directory pattern: 'foo/**' → '**/foo/**'\n result.push(`**/${pattern}`);\n } else if (pattern.startsWith('*.')) {\n // Extension pattern: '*.min.js' → '**/*.min.js'\n result.push(`**/${pattern}`);\n } else if (!pattern.includes('/') && !pattern.includes('*')) {\n // Simple directory name: 'node_modules' → '**/node_modules/**'\n result.push(`**/${pattern}/**`);\n } else {\n // Keep as-is (might be a specific path pattern)\n result.push(pattern);\n }\n }\n\n return result;\n}\n\n/**\n * Parsed patterns optimized for fs.readdir scanning.\n */\nexport interface ScanningPatterns {\n /** Directory names to skip during traversal (e.g., 'node_modules', '.git') */\n dirs: Set<string>;\n /** Predicate functions to test if a filename should be ignored (e.g., for '*.min.js') */\n fileMatchers: Array<(filename: string) => boolean>;\n}\n\n/**\n * Parse patterns into structures optimized for fs.readdir filtering.\n *\n * This is more efficient than glob matching for directory traversal since\n * it allows early termination when encountering ignored directories.\n *\n * @param patterns - User-provided patterns from config\n * @param includeDefaults - Whether to include DEFAULT_IGNORE_DIRS (default: true)\n */\nexport function parseIgnorePatternsForScanning(\n patterns: readonly string[],\n includeDefaults = true\n): ScanningPatterns {\n const dirs = new Set<string>();\n const fileMatchers: Array<(filename: string) => boolean> = [];\n\n // Add defaults first\n if (includeDefaults) {\n for (const dir of DEFAULT_IGNORE_DIRS) {\n dirs.add(dir);\n }\n // Add default file patterns via dedicated exact-file matcher path\n // (do NOT feed through the directory-name parser which misclassifies no-wildcard patterns)\n for (const pattern of DEFAULT_IGNORE_FILE_PATTERNS) {\n if (pattern.startsWith('*')) {\n // Glob pattern: '*.map' → endsWith matcher\n const ext = pattern.slice(1); // Remove leading '*'\n fileMatchers.push((filename) => filename.endsWith(ext));\n } else {\n // Exact filename: 'package-lock.json' → equality check\n fileMatchers.push((filename) => filename === pattern);\n }\n }\n }\n\n // Process user patterns\n for (const pattern of patterns) {\n if (pattern.startsWith('**/') && pattern.endsWith('/**')) {\n // Glob format: '**/node_modules/**' → extract 'node_modules'\n const inner = pattern.slice(3, -3);\n if (!inner.includes('/') && !inner.includes('*')) {\n dirs.add(inner);\n }\n } else if (pattern.endsWith('/**')) {\n // Directory pattern: 'node_modules/**' → 'node_modules'\n dirs.add(pattern.slice(0, -3));\n } else if (pattern.startsWith('*.')) {\n // Extension pattern: '*.min.js' → matches files ending with '.min.js'\n const ext = pattern.slice(1); // Remove leading '*'\n fileMatchers.push((filename) => filename.endsWith(ext));\n } else if (!pattern.includes('/') && !pattern.includes('*')) {\n // Simple directory name: 'node_modules' → treat as directory\n dirs.add(pattern);\n }\n // Note: Complex patterns like 'src/**/*.test.ts' are not supported for scanning\n // They would require full glob matching which defeats the purpose of fast scanning\n }\n\n return { dirs, fileMatchers };\n}\n","/**\n * Model Compatibility Validation\n *\n * Guards against searching or incrementally indexing stores with mismatched embedding models.\n * Ensures stores are only queried with the same model they were indexed with.\n */\n\nimport type { Store } from '../types/store.js';\n\nexport interface ModelValidationContext {\n currentModelId: string;\n}\n\n/**\n * Validates that a store's embedding model matches the current configuration.\n *\n * @throws Error if store was indexed with a different model or has no model tracking\n */\nexport function validateStoreModelCompatibility(store: Store, ctx: ModelValidationContext): void {\n // Stores without modelId (schemaVersion < 2) must be reindexed\n if (!store.modelId) {\n throw new Error(\n `Store \"${store.name}\" has no model tracking (schema v1). ` +\n `Reindex required: /bluera-knowledge:index ${store.name}`\n );\n }\n\n if (store.modelId !== ctx.currentModelId) {\n throw new Error(\n `Model mismatch: Store \"${store.name}\" was indexed with \"${store.modelId}\", ` +\n `but current config uses \"${ctx.currentModelId}\". ` +\n `Reindex required: /bluera-knowledge:index ${store.name}`\n );\n }\n}\n\n/**\n * Check if a store's model matches the current configuration without throwing.\n *\n * @returns Object with compatibility status and details\n */\nexport function checkStoreModelCompatibility(\n store: Store,\n ctx: ModelValidationContext\n): {\n compatible: boolean;\n modelId: string | undefined;\n reason?: string;\n} {\n if (!store.modelId) {\n return {\n compatible: false,\n modelId: undefined,\n reason: 'Store has no model tracking (schema v1)',\n };\n }\n\n if (store.modelId !== ctx.currentModelId) {\n return {\n compatible: false,\n modelId: store.modelId,\n reason: `Indexed with different model: ${store.modelId}`,\n };\n }\n\n return {\n compatible: true,\n modelId: store.modelId,\n };\n}\n"],"mappings":";AAAA,SAAS,aAA6B;;;ACQ/B,IAAM,sBAAsB;AAAA;AAAA,EAEjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AACF;AAWO,IAAM,+BAA+B;AAAA;AAAA,EAE1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AACF;AAcO,SAAS,sBACd,UACA,kBAAkB,MACR;AACV,QAAM,SAAmB,CAAC;AAG1B,MAAI,iBAAiB;AACnB,eAAW,OAAO,qBAAqB;AACrC,aAAO,KAAK,MAAM,GAAG,KAAK;AAAA,IAC5B;AAEA,eAAW,WAAW,8BAA8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,wBAAQ,WAAW,KAAK;AACxB;AAAA,cACF;AAAA,YACF;AAEA,wBAAY;AAAA,UACd,SAAS,GAAG;AACV,kBAAM,QAAQ,aAAa,QAAQ,IAAI,IAAI,MAAM,OAAO,CAAC,CAAC;AAC1D,oBAAQ,KAAK;AAAA,UACf;AAAA,QACF,GAAG;AAAA,MACL,GAAG,UAAU;AACb,WAAK,gBAAgB,IAAI,MAAM,IAAI,OAAO;AAAA,IAC5C;AAEA,YAAQ,GAAG,OAAO,cAAc;AAEhC,YAAQ,GAAG,SAAS,CAAC,MAAM;AACzB,YAAM,QAAQ,aAAa,QAAQ,IAAI,IAAI,MAAM,OAAO,CAAC,CAAC;AAC1D,cAAQ,KAAK;AAAA,IACf,CAAC;AAED,SAAK,SAAS,IAAI,MAAM,IAAI,OAAO;AACnC,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAAA,EAEA,MAAM,QAAQ,SAAgC;AAE5C,UAAM,iBAAiB,KAAK,gBAAgB,IAAI,OAAO;AACvD,QAAI,gBAAgB;AAClB,mBAAa,cAAc;AAC3B,WAAK,gBAAgB,OAAO,OAAO;AAAA,IACrC;AAEA,UAAM,UAAU,KAAK,SAAS,IAAI,OAAO;AACzC,QAAI,SAAS;AACX,YAAM,QAAQ,MAAM;AACpB,WAAK,SAAS,OAAO,OAAO;AAAA,IAC9B;AAAA,EACF;AAAA,EAEA,MAAM,aAA4B;AAChC,eAAW,CAAC,EAAE,KAAK,KAAK,UAAU;AAChC,YAAM,KAAK,QAAQ,EAAE;AAAA,IACvB;AAAA,EACF;AACF;","names":[]}
package/dist/index.js CHANGED
@@ -3,11 +3,11 @@ import {
3
3
  ZilAdapter,
4
4
  runMCPServer,
5
5
  spawnBackgroundWorker
6
- } from "./chunk-UXT3BCAH.js";
6
+ } from "./chunk-AEXFPA57.js";
7
7
  import {
8
8
  IntelligentCrawler,
9
9
  getCrawlStrategy
10
- } from "./chunk-BYLIDCWD.js";
10
+ } from "./chunk-KCI4U6FH.js";
11
11
  import {
12
12
  ASTParser,
13
13
  AdapterRegistry,
@@ -25,14 +25,14 @@ import {
25
25
  isRepoStoreDefinition,
26
26
  isWebStoreDefinition,
27
27
  ok
28
- } from "./chunk-WP2GERAJ.js";
28
+ } from "./chunk-B335UOU7.js";
29
29
  import {
30
30
  createDocumentId
31
31
  } from "./chunk-CLIMKLTW.js";
32
32
  import {
33
33
  checkStoreModelCompatibility,
34
34
  validateStoreModelCompatibility
35
- } from "./chunk-H25AEF47.js";
35
+ } from "./chunk-N3XYMAU3.js";
36
36
  import "./chunk-DGUM43GV.js";
37
37
 
38
38
  // src/cli/commands/crawl.ts
@@ -368,7 +368,7 @@ function createIndexCommand(getOptions) {
368
368
  return;
369
369
  }
370
370
  const appConfig = await services.config.load();
371
- const { WatchService } = await import("./watch.service-THP6X5ZZ.js");
371
+ const { WatchService } = await import("./watch.service-LRFCT52P.js");
372
372
  const watchService = new WatchService(services.index, services.lance, services.embeddings, {
373
373
  ignorePatterns: appConfig.indexing.ignorePatterns,
374
374
  currentModelId: services.store.getCurrentModelId()
@@ -1235,6 +1235,9 @@ Search: "${query}"`);
1235
1235
  if (results.maxRawScore !== void 0) {
1236
1236
  statusLine += ` | MaxRaw: ${results.maxRawScore.toFixed(3)}`;
1237
1237
  }
1238
+ if (results.rerankTimeMs !== void 0) {
1239
+ statusLine += ` | Rerank: ${String(results.rerankTimeMs)}ms`;
1240
+ }
1238
1241
  console.log(`${statusLine}
1239
1242
  `);
1240
1243
  if (results.results.length === 0) {