bluera-knowledge 0.20.0 → 0.21.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/CHANGELOG.md +21 -0
- package/README.md +21 -0
- package/dist/{chunk-OZIVRLZE.js → chunk-BZQ7KWEE.js} +67 -5
- package/dist/chunk-BZQ7KWEE.js.map +1 -0
- package/dist/{chunk-HXBIIMYL.js → chunk-H25AEF47.js} +42 -1
- package/dist/chunk-H25AEF47.js.map +1 -0
- package/dist/{chunk-26MBEEKM.js → chunk-VNHZ534Q.js} +2 -2
- package/dist/{chunk-PZE2MO7H.js → chunk-ZR23KJPJ.js} +206 -38
- package/dist/chunk-ZR23KJPJ.js.map +1 -0
- package/dist/index.js +13 -6
- package/dist/index.js.map +1 -1
- package/dist/mcp/bootstrap.js +1 -1
- package/dist/mcp/bootstrap.js.map +1 -1
- package/dist/mcp/server.d.ts +44 -3
- package/dist/mcp/server.js +3 -3
- package/dist/{watch.service-NXRWLJG6.js → watch.service-THP6X5ZZ.js} +2 -2
- package/dist/workers/background-worker-cli.js +3 -3
- package/package.json +2 -2
- package/dist/chunk-HXBIIMYL.js.map +0 -1
- package/dist/chunk-OZIVRLZE.js.map +0 -1
- package/dist/chunk-PZE2MO7H.js.map +0 -1
- /package/dist/{chunk-26MBEEKM.js.map → chunk-VNHZ534Q.js.map} +0 -0
- /package/dist/{watch.service-NXRWLJG6.js.map → watch.service-THP6X5ZZ.js.map} +0 -0
package/dist/mcp/bootstrap.js
CHANGED
|
@@ -56,7 +56,7 @@ function installWithPackageManager() {
|
|
|
56
56
|
return false;
|
|
57
57
|
}
|
|
58
58
|
})();
|
|
59
|
-
const cmd = hasBun ? "bun install --frozen-lockfile" : "npm
|
|
59
|
+
const cmd = hasBun ? "bun install --frozen-lockfile" : "npm install --silent";
|
|
60
60
|
log("info", "Installing dependencies with package manager", { hasBun, cmd });
|
|
61
61
|
try {
|
|
62
62
|
const output = execSync(cmd, { cwd: pluginRoot, stdio: "pipe" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/mcp/bootstrap.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * MCP Server Bootstrap - installs dependencies before starting server.\n *\n * Uses only Node.js built-ins (no external dependencies required).\n * Self-locates plugin root via import.meta.url (doesn't rely on CLAUDE_PLUGIN_ROOT).\n *\n * Dependency installation strategy:\n * 1. Fast path: node_modules already exists → skip\n * 2. Package manager: Run bun install or npm ci\n *\n * IMPORTANT: MCP servers must NOT log to stderr - Claude Code treats stderr output\n * as an error and may mark the MCP server as failed. All logging goes to file.\n */\nimport { execSync } from 'node:child_process';\nimport {\n appendFileSync,\n existsSync,\n mkdirSync,\n readFileSync,\n rmSync,\n unlinkSync,\n writeFileSync,\n} from 'node:fs';\nimport { homedir } from 'node:os';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\n// Logging helper - writes to file since MCP servers must NOT use stderr\n// (Claude Code treats stderr as error and may fail the server)\n// JSON format matches pino output for consistency\n// Use PROJECT_ROOT if available (set by Claude Code), else fall back to home dir\nconst envProjectRoot = process.env['PROJECT_ROOT'];\nconst logDir =\n envProjectRoot !== undefined && envProjectRoot !== ''\n ? join(envProjectRoot, '.bluera', 'bluera-knowledge', 'logs')\n : join(homedir(), '.bluera', 'bluera-knowledge', 'logs');\nconst logFile = join(logDir, 'app.log');\n\nconst log = (\n level: 'info' | 'error' | 'debug',\n msg: string,\n data?: Record<string, unknown>\n): void => {\n try {\n mkdirSync(logDir, { recursive: true });\n const entry = {\n time: new Date().toISOString(),\n level,\n module: 'bootstrap',\n msg,\n ...data,\n };\n appendFileSync(logFile, `${JSON.stringify(entry)}\\n`);\n } catch {\n // Silently fail - we cannot use stderr for MCP servers\n }\n};\n\n// Self-locate plugin root from this file's path\n// dist/mcp/bootstrap.js -> plugin root (two directories up)\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\nconst pluginRoot = join(__dirname, '..', '..');\n\n// Lock file to detect interrupted installs\nconst installLockFile = join(pluginRoot, '.node_modules_installing');\n\n// Get version from package.json for logging\nconst getVersion = (): string => {\n try {\n const pkg: unknown = JSON.parse(readFileSync(join(pluginRoot, 'package.json'), 'utf-8'));\n if (\n typeof pkg === 'object' &&\n pkg !== null &&\n 'version' in pkg &&\n typeof pkg.version === 'string'\n ) {\n return `v${pkg.version}`;\n }\n return 'unknown';\n } catch {\n return 'unknown';\n }\n};\n\n/**\n * Install dependencies using bun or npm.\n * Uses stdio: 'pipe' to capture output and avoid corrupting MCP stdio transport.\n */\nfunction installWithPackageManager(): void {\n const hasBun = ((): boolean => {\n try {\n execSync('which bun', { stdio: 'ignore' });\n return true;\n } catch {\n return false;\n }\n })();\n\n const cmd = hasBun ? 'bun install --frozen-lockfile' : 'npm ci --silent';\n log('info', 'Installing dependencies with package manager', { hasBun, cmd });\n\n try {\n // Use stdio: 'pipe' to capture output - 'inherit' would corrupt MCP stdio transport\n const output = execSync(cmd, { cwd: pluginRoot, stdio: 'pipe' });\n if (output.length > 0) {\n log('debug', 'Install output', { output: output.toString().trim() });\n }\n log('info', 'Dependencies installed via package manager');\n } catch (error) {\n // Log installation failure details before re-throwing\n // execSync throws an object with stdout/stderr buffers on failure\n const errorMessage = error instanceof Error ? error.message : String(error);\n const errorDetails: Record<string, unknown> = { message: errorMessage };\n\n if (typeof error === 'object' && error !== null) {\n if ('stdout' in error && Buffer.isBuffer(error.stdout)) {\n errorDetails['stdout'] = error.stdout.toString().trim();\n }\n if ('stderr' in error && Buffer.isBuffer(error.stderr)) {\n errorDetails['stderr'] = error.stderr.toString().trim();\n }\n }\n\n log('error', 'Dependency installation failed', errorDetails);\n throw error;\n }\n}\n\n/**\n * Ensure dependencies are available.\n * Uses a lock file to detect and recover from interrupted installs.\n */\nfunction ensureDependencies(): void {\n const startTime = Date.now();\n log('debug', 'ensureDependencies starting');\n\n const nodeModulesPath = join(pluginRoot, 'node_modules');\n\n // Check for interrupted install - lock file exists means previous install was killed\n log('debug', 'Checking for interrupted install lock file', { lockFile: installLockFile });\n if (existsSync(installLockFile)) {\n log('info', 'Detected interrupted install, cleaning up');\n rmSync(nodeModulesPath, { recursive: true, force: true });\n unlinkSync(installLockFile);\n log('debug', 'Cleanup complete');\n }\n\n // Fast path: already installed\n log('debug', 'Checking node_modules exists', { path: nodeModulesPath });\n if (existsSync(nodeModulesPath)) {\n log('info', 'Dependencies already installed', { elapsedMs: Date.now() - startTime });\n return;\n }\n\n // Create lock file before install (left behind if install interrupted/fails)\n log('debug', 'Creating lock file before install');\n writeFileSync(installLockFile, new Date().toISOString());\n\n const installStart = Date.now();\n log('debug', 'Starting package manager install');\n installWithPackageManager();\n log('debug', 'Package manager install finished', { elapsedMs: Date.now() - installStart });\n\n // Remove lock file on success\n unlinkSync(installLockFile);\n log('debug', 'ensureDependencies complete', { totalElapsedMs: Date.now() - startTime });\n}\n\n// Main entry point\nconst bootstrapStartTime = Date.now();\nconst VERSION = getVersion();\nlog('info', 'Bootstrap starting', { pluginRoot, version: VERSION });\n\nlog('debug', 'Calling ensureDependencies');\nensureDependencies();\nlog('debug', 'ensureDependencies returned', { elapsedMs: Date.now() - bootstrapStartTime });\n\n// Now that dependencies are installed, import and run the server\n// Dynamic import required because @modelcontextprotocol/sdk wouldn't be available before install\nlog('info', 'Loading server module');\nconst importStart = Date.now();\nconst { runMCPServer } = await import('./server.js');\nlog('debug', 'Server module loaded', { elapsedMs: Date.now() - importStart });\n\nconst projectRoot = process.env['PROJECT_ROOT'];\nif (projectRoot === undefined) {\n throw new Error('PROJECT_ROOT environment variable is required');\n}\n\nlog('info', 'Starting MCP server', {\n projectRoot,\n dataDir: process.env['DATA_DIR'],\n});\n\nawait runMCPServer({\n dataDir: process.env['DATA_DIR'],\n config: process.env['CONFIG_PATH'],\n projectRoot,\n});\n"],"mappings":";;;AAcA,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,E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C,EAAE,WAAW,KAAK,IAAI,IAAI,UAAU,CAAC;AACnF;AAAA,EACF;AAGA,MAAI,SAAS,mCAAmC;AAChD,gBAAc,kBAAiB,oBAAI,KAAK,GAAE,YAAY,CAAC;AAEvD,QAAM,eAAe,KAAK,IAAI;AAC9B,MAAI,SAAS,kCAAkC;AAC/C,4BAA0B;AAC1B,MAAI,SAAS,oCAAoC,EAAE,WAAW,KAAK,IAAI,IAAI,aAAa,CAAC;AAGzF,aAAW,eAAe;AAC1B,MAAI,SAAS,+BAA+B,EAAE,gBAAgB,KAAK,IAAI,IAAI,UAAU,CAAC;AACxF;AAGA,IAAM,qBAAqB,KAAK,IAAI;AACpC,IAAM,UAAU,WAAW;AAC3B,IAAI,QAAQ,sBAAsB,EAAE,YAAY,SAAS,QAAQ,CAAC;AAElE,IAAI,SAAS,4BAA4B;AACzC,mBAAmB;AACnB,IAAI,SAAS,+BAA+B,EAAE,WAAW,KAAK,IAAI,IAAI,mBAAmB,CAAC;AAI1F,IAAI,QAAQ,uBAAuB;AACnC,IAAM,cAAc,KAAK,IAAI;AAC7B,IAAM,EAAE,aAAa,IAAI,MAAM,OAAO,aAAa;AACnD,IAAI,SAAS,wBAAwB,EAAE,WAAW,KAAK,IAAI,IAAI,YAAY,CAAC;AAE5E,IAAM,cAAc,QAAQ,IAAI,cAAc;AAC9C,IAAI,gBAAgB,QAAW;AAC7B,QAAM,IAAI,MAAM,+CAA+C;AACjE;AAEA,IAAI,QAAQ,uBAAuB;AAAA,EACjC;AAAA,EACA,SAAS,QAAQ,IAAI,UAAU;AACjC,CAAC;AAED,MAAM,aAAa;AAAA,EACjB,SAAS,QAAQ,IAAI,UAAU;AAAA,EAC/B,QAAQ,QAAQ,IAAI,aAAa;AAAA,EACjC;AACF,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/mcp/bootstrap.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * MCP Server Bootstrap - installs dependencies before starting server.\n *\n * Uses only Node.js built-ins (no external dependencies required).\n * Self-locates plugin root via import.meta.url (doesn't rely on CLAUDE_PLUGIN_ROOT).\n *\n * Dependency installation strategy:\n * 1. Fast path: node_modules already exists → skip\n * 2. Package manager: Run bun install or npm install\n *\n * IMPORTANT: MCP servers must NOT log to stderr - Claude Code treats stderr output\n * as an error and may mark the MCP server as failed. All logging goes to file.\n */\nimport { execSync } from 'node:child_process';\nimport {\n appendFileSync,\n existsSync,\n mkdirSync,\n readFileSync,\n rmSync,\n unlinkSync,\n writeFileSync,\n} from 'node:fs';\nimport { homedir } from 'node:os';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\n// Logging helper - writes to file since MCP servers must NOT use stderr\n// (Claude Code treats stderr as error and may fail the server)\n// JSON format matches pino output for consistency\n// Use PROJECT_ROOT if available (set by Claude Code), else fall back to home dir\nconst envProjectRoot = process.env['PROJECT_ROOT'];\nconst logDir =\n envProjectRoot !== undefined && envProjectRoot !== ''\n ? join(envProjectRoot, '.bluera', 'bluera-knowledge', 'logs')\n : join(homedir(), '.bluera', 'bluera-knowledge', 'logs');\nconst logFile = join(logDir, 'app.log');\n\nconst log = (\n level: 'info' | 'error' | 'debug',\n msg: string,\n data?: Record<string, unknown>\n): void => {\n try {\n mkdirSync(logDir, { recursive: true });\n const entry = {\n time: new Date().toISOString(),\n level,\n module: 'bootstrap',\n msg,\n ...data,\n };\n appendFileSync(logFile, `${JSON.stringify(entry)}\\n`);\n } catch {\n // Silently fail - we cannot use stderr for MCP servers\n }\n};\n\n// Self-locate plugin root from this file's path\n// dist/mcp/bootstrap.js -> plugin root (two directories up)\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\nconst pluginRoot = join(__dirname, '..', '..');\n\n// Lock file to detect interrupted installs\nconst installLockFile = join(pluginRoot, '.node_modules_installing');\n\n// Get version from package.json for logging\nconst getVersion = (): string => {\n try {\n const pkg: unknown = JSON.parse(readFileSync(join(pluginRoot, 'package.json'), 'utf-8'));\n if (\n typeof pkg === 'object' &&\n pkg !== null &&\n 'version' in pkg &&\n typeof pkg.version === 'string'\n ) {\n return `v${pkg.version}`;\n }\n return 'unknown';\n } catch {\n return 'unknown';\n }\n};\n\n/**\n * Install dependencies using bun or npm.\n * Uses stdio: 'pipe' to capture output and avoid corrupting MCP stdio transport.\n */\nfunction installWithPackageManager(): void {\n const hasBun = ((): boolean => {\n try {\n execSync('which bun', { stdio: 'ignore' });\n return true;\n } catch {\n return false;\n }\n })();\n\n const cmd = hasBun ? 'bun install --frozen-lockfile' : 'npm install --silent';\n log('info', 'Installing dependencies with package manager', { hasBun, cmd });\n\n try {\n // Use stdio: 'pipe' to capture output - 'inherit' would corrupt MCP stdio transport\n const output = execSync(cmd, { cwd: pluginRoot, stdio: 'pipe' });\n if (output.length > 0) {\n log('debug', 'Install output', { output: output.toString().trim() });\n }\n log('info', 'Dependencies installed via package manager');\n } catch (error) {\n // Log installation failure details before re-throwing\n // execSync throws an object with stdout/stderr buffers on failure\n const errorMessage = error instanceof Error ? error.message : String(error);\n const errorDetails: Record<string, unknown> = { message: errorMessage };\n\n if (typeof error === 'object' && error !== null) {\n if ('stdout' in error && Buffer.isBuffer(error.stdout)) {\n errorDetails['stdout'] = error.stdout.toString().trim();\n }\n if ('stderr' in error && Buffer.isBuffer(error.stderr)) {\n errorDetails['stderr'] = error.stderr.toString().trim();\n }\n }\n\n log('error', 'Dependency installation failed', errorDetails);\n throw error;\n }\n}\n\n/**\n * Ensure dependencies are available.\n * Uses a lock file to detect and recover from interrupted installs.\n */\nfunction ensureDependencies(): void {\n const startTime = Date.now();\n log('debug', 'ensureDependencies starting');\n\n const nodeModulesPath = join(pluginRoot, 'node_modules');\n\n // Check for interrupted install - lock file exists means previous install was killed\n log('debug', 'Checking for interrupted install lock file', { lockFile: installLockFile });\n if (existsSync(installLockFile)) {\n log('info', 'Detected interrupted install, cleaning up');\n rmSync(nodeModulesPath, { recursive: true, force: true });\n unlinkSync(installLockFile);\n log('debug', 'Cleanup complete');\n }\n\n // Fast path: already installed\n log('debug', 'Checking node_modules exists', { path: nodeModulesPath });\n if (existsSync(nodeModulesPath)) {\n log('info', 'Dependencies already installed', { elapsedMs: Date.now() - startTime });\n return;\n }\n\n // Create lock file before install (left behind if install interrupted/fails)\n log('debug', 'Creating lock file before install');\n writeFileSync(installLockFile, new Date().toISOString());\n\n const installStart = Date.now();\n log('debug', 'Starting package manager install');\n installWithPackageManager();\n log('debug', 'Package manager install finished', { elapsedMs: Date.now() - installStart });\n\n // Remove lock file on success\n unlinkSync(installLockFile);\n log('debug', 'ensureDependencies complete', { totalElapsedMs: Date.now() - startTime });\n}\n\n// Main entry point\nconst bootstrapStartTime = Date.now();\nconst VERSION = getVersion();\nlog('info', 'Bootstrap starting', { pluginRoot, version: VERSION });\n\nlog('debug', 'Calling ensureDependencies');\nensureDependencies();\nlog('debug', 'ensureDependencies returned', { elapsedMs: Date.now() - bootstrapStartTime });\n\n// Now that dependencies are installed, import and run the server\n// Dynamic import required because @modelcontextprotocol/sdk wouldn't be available before install\nlog('info', 'Loading server module');\nconst importStart = Date.now();\nconst { runMCPServer } = await import('./server.js');\nlog('debug', 'Server module loaded', { elapsedMs: Date.now() - importStart });\n\nconst projectRoot = process.env['PROJECT_ROOT'];\nif (projectRoot === undefined) {\n throw new Error('PROJECT_ROOT environment variable is required');\n}\n\nlog('info', 'Starting MCP server', {\n projectRoot,\n dataDir: process.env['DATA_DIR'],\n});\n\nawait runMCPServer({\n dataDir: process.env['DATA_DIR'],\n config: process.env['CONFIG_PATH'],\n projectRoot,\n});\n"],"mappings":";;;AAcA,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,eAAe;AACxB,SAAS,SAAS,YAAY;AAC9B,SAAS,qBAAqB;AAM9B,IAAM,iBAAiB,QAAQ,IAAI,cAAc;AACjD,IAAM,SACJ,mBAAmB,UAAa,mB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K,IAAI;AAC9B,MAAI,SAAS,kCAAkC;AAC/C,4BAA0B;AAC1B,MAAI,SAAS,oCAAoC,EAAE,WAAW,KAAK,IAAI,IAAI,aAAa,CAAC;AAGzF,aAAW,eAAe;AAC1B,MAAI,SAAS,+BAA+B,EAAE,gBAAgB,KAAK,IAAI,IAAI,UAAU,CAAC;AACxF;AAGA,IAAM,qBAAqB,KAAK,IAAI;AACpC,IAAM,UAAU,WAAW;AAC3B,IAAI,QAAQ,sBAAsB,EAAE,YAAY,SAAS,QAAQ,CAAC;AAElE,IAAI,SAAS,4BAA4B;AACzC,mBAAmB;AACnB,IAAI,SAAS,+BAA+B,EAAE,WAAW,KAAK,IAAI,IAAI,mBAAmB,CAAC;AAI1F,IAAI,QAAQ,uBAAuB;AACnC,IAAM,cAAc,KAAK,IAAI;AAC7B,IAAM,EAAE,aAAa,IAAI,MAAM,OAAO,aAAa;AACnD,IAAI,SAAS,wBAAwB,EAAE,WAAW,KAAK,IAAI,IAAI,YAAY,CAAC;AAE5E,IAAM,cAAc,QAAQ,IAAI,cAAc;AAC9C,IAAI,gBAAgB,QAAW;AAC7B,QAAM,IAAI,MAAM,+CAA+C;AACjE;AAEA,IAAI,QAAQ,uBAAuB;AAAA,EACjC;AAAA,EACA,SAAS,QAAQ,IAAI,UAAU;AACjC,CAAC;AAED,MAAM,aAAa;AAAA,EACjB,SAAS,QAAQ,IAAI,UAAU;AAAA,EAC/B,QAAQ,QAAQ,IAAI,aAAa;AAAA,EACjC;AACF,CAAC;","names":[]}
|
package/dist/mcp/server.d.ts
CHANGED
|
@@ -449,7 +449,18 @@ declare class LanceStore {
|
|
|
449
449
|
private readonly tables;
|
|
450
450
|
private readonly dataDir;
|
|
451
451
|
private _dimensions;
|
|
452
|
+
private embeddingFunction;
|
|
452
453
|
constructor(dataDir: string);
|
|
454
|
+
/**
|
|
455
|
+
* Set the embedding function for auto-embedding queries.
|
|
456
|
+
* Must be called before initialize() for new tables.
|
|
457
|
+
* The embedding function is initialized and its dimensions are used for schema creation.
|
|
458
|
+
*/
|
|
459
|
+
setEmbeddingFunction(config: EmbeddingConfig): Promise<void>;
|
|
460
|
+
/**
|
|
461
|
+
* Check if embedding function is available for auto-embedding queries.
|
|
462
|
+
*/
|
|
463
|
+
hasEmbeddingFunction(): boolean;
|
|
453
464
|
/**
|
|
454
465
|
* Set the embedding dimensions. Must be called before initialize().
|
|
455
466
|
* This allows dimensions to be derived from the embedding model at runtime.
|
|
@@ -466,6 +477,17 @@ declare class LanceStore {
|
|
|
466
477
|
score: number;
|
|
467
478
|
metadata: DocumentMetadata;
|
|
468
479
|
}>>;
|
|
480
|
+
/**
|
|
481
|
+
* Search using a text query with automatic embedding.
|
|
482
|
+
* Requires setEmbeddingFunction() to have been called.
|
|
483
|
+
* Uses the embedding function to compute query embeddings consistently with document embeddings.
|
|
484
|
+
*/
|
|
485
|
+
searchText(storeId: StoreId, query: string, limit: number): Promise<Array<{
|
|
486
|
+
id: DocumentId;
|
|
487
|
+
content: string;
|
|
488
|
+
score: number;
|
|
489
|
+
metadata: DocumentMetadata;
|
|
490
|
+
}>>;
|
|
469
491
|
createFtsIndex(storeId: StoreId): Promise<void>;
|
|
470
492
|
fullTextSearch(storeId: StoreId, query: string, limit: number): Promise<Array<{
|
|
471
493
|
id: DocumentId;
|
|
@@ -512,6 +534,16 @@ interface BaseStore {
|
|
|
512
534
|
readonly status?: StoreStatus | undefined;
|
|
513
535
|
readonly createdAt: Date;
|
|
514
536
|
readonly updatedAt: Date;
|
|
537
|
+
/**
|
|
538
|
+
* Schema version for detecting incompatible stores.
|
|
539
|
+
* Stores with schemaVersion < CURRENT_SCHEMA_VERSION require reindex.
|
|
540
|
+
*/
|
|
541
|
+
readonly schemaVersion: number;
|
|
542
|
+
/**
|
|
543
|
+
* Embedding model ID used to index this store.
|
|
544
|
+
* Used for provenance tracking and mismatch detection.
|
|
545
|
+
*/
|
|
546
|
+
readonly modelId: string;
|
|
515
547
|
}
|
|
516
548
|
interface FileStore extends BaseStore {
|
|
517
549
|
readonly type: 'file';
|
|
@@ -683,13 +715,12 @@ interface SearchResponse {
|
|
|
683
715
|
|
|
684
716
|
declare class SearchService {
|
|
685
717
|
private readonly lanceStore;
|
|
686
|
-
private readonly embeddingEngine;
|
|
687
718
|
private readonly codeUnitService;
|
|
688
719
|
private readonly codeGraphService;
|
|
689
720
|
private readonly graphCache;
|
|
690
721
|
private readonly searchConfig;
|
|
691
722
|
private readonly unsubscribeCacheInvalidation;
|
|
692
|
-
constructor(lanceStore: LanceStore,
|
|
723
|
+
constructor(lanceStore: LanceStore, codeGraphService?: CodeGraphService, searchConfig?: SearchConfig);
|
|
693
724
|
/**
|
|
694
725
|
* Clean up resources (unsubscribe from events).
|
|
695
726
|
* Call this when destroying the service.
|
|
@@ -728,6 +759,8 @@ declare class SearchService {
|
|
|
728
759
|
/**
|
|
729
760
|
* Fetch raw vector search results without normalization.
|
|
730
761
|
* Returns results with raw cosine similarity scores [0-1].
|
|
762
|
+
* Uses LanceDB's embedding function for query embedding,
|
|
763
|
+
* ensuring consistent query/document embedding through a single code path.
|
|
731
764
|
*/
|
|
732
765
|
private vectorSearchRaw;
|
|
733
766
|
private ftsSearch;
|
|
@@ -975,6 +1008,8 @@ interface StoreServiceOptions {
|
|
|
975
1008
|
gitignoreService?: GitignoreService;
|
|
976
1009
|
/** Optional project root for resolving relative paths */
|
|
977
1010
|
projectRoot?: string;
|
|
1011
|
+
/** Embedding model ID for provenance tracking (required for new stores) */
|
|
1012
|
+
embeddingModelId: string;
|
|
978
1013
|
}
|
|
979
1014
|
interface OperationOptions {
|
|
980
1015
|
/** Skip syncing to store definitions (used by stores:sync command) */
|
|
@@ -985,8 +1020,14 @@ declare class StoreService {
|
|
|
985
1020
|
private readonly definitionService;
|
|
986
1021
|
private readonly gitignoreService;
|
|
987
1022
|
private readonly projectRoot;
|
|
1023
|
+
private readonly embeddingModelId;
|
|
988
1024
|
private registry;
|
|
989
|
-
constructor(dataDir: string, options
|
|
1025
|
+
constructor(dataDir: string, options: StoreServiceOptions);
|
|
1026
|
+
/**
|
|
1027
|
+
* Get the current embedding model ID used for new stores.
|
|
1028
|
+
* Used by model compatibility validation.
|
|
1029
|
+
*/
|
|
1030
|
+
getCurrentModelId(): string;
|
|
990
1031
|
initialize(): Promise<void>;
|
|
991
1032
|
/**
|
|
992
1033
|
* Convert a Store and CreateStoreInput to a StoreDefinition for persistence.
|
package/dist/mcp/server.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createMCPServer,
|
|
3
3
|
runMCPServer
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-BZQ7KWEE.js";
|
|
5
|
+
import "../chunk-ZR23KJPJ.js";
|
|
6
6
|
import "../chunk-CLIMKLTW.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-H25AEF47.js";
|
|
8
8
|
import "../chunk-DGUM43GV.js";
|
|
9
9
|
export {
|
|
10
10
|
createMCPServer,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
IntelligentCrawler
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-VNHZ534Q.js";
|
|
5
5
|
import {
|
|
6
6
|
JobService,
|
|
7
7
|
createLogger,
|
|
8
8
|
createServices,
|
|
9
9
|
destroyServices,
|
|
10
10
|
shutdownLogger
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-ZR23KJPJ.js";
|
|
12
12
|
import {
|
|
13
13
|
createDocumentId,
|
|
14
14
|
createStoreId
|
|
15
15
|
} from "../chunk-CLIMKLTW.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-H25AEF47.js";
|
|
17
17
|
import "../chunk-DGUM43GV.js";
|
|
18
18
|
|
|
19
19
|
// src/workers/background-worker-cli.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bluera-knowledge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.1",
|
|
4
4
|
"description": "CLI tool for managing knowledge stores with semantic search",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"test:run": "vitest run",
|
|
19
19
|
"test:changed": "bash -c 'OUTPUT=$(vitest run --changed --reporter=dot --silent 2>&1); echo \"$OUTPUT\" | tail -5; if echo \"$OUTPUT\" | grep -qE \"Tests.*[0-9]+ failed\"; then exit 1; fi'",
|
|
20
20
|
"test:changed:verbose": "vitest run --changed",
|
|
21
|
-
"test:coverage": "bash -c 'OUTPUT=$(vitest run --coverage --reporter=dot 2>&1); echo \"$OUTPUT\" | grep -E \"(Test Files|Tests|Coverage|threshold|ERROR)\" | tail -
|
|
21
|
+
"test:coverage": "bash -c 'OUTPUT=$(vitest run --coverage --reporter=dot 2>&1); echo \"$OUTPUT\" | grep -E \"(Test Files|Tests|Coverage|threshold|ERROR|FAIL|AssertionError)\" | tail -20; if echo \"$OUTPUT\" | grep -qE \"Tests.*[0-9]+ failed\"; then echo \"$OUTPUT\" | grep -B5 -A5 \"AssertionError\\|FAIL.*integration\" | tail -30; exit 1; fi; if echo \"$OUTPUT\" | grep -qE \"ERROR.*threshold\"; then exit 1; fi'",
|
|
22
22
|
"test:coverage:verbose": "vitest run --coverage",
|
|
23
23
|
"format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
|
|
24
24
|
"format:check": "prettier --check \"src/**/*.ts\" \"tests/**/*.ts\" --log-level warn && echo '✓ Format check passed'",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/services/watch.service.ts","../src/utils/ignore-patterns.ts"],"sourcesContent":["import { watch, type FSWatcher } from 'chokidar';\nimport { normalizeGlobPatterns } from '../utils/ignore-patterns.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}\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\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 }\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 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 = ['node_modules', '.git', '.bluera', 'dist', 'build'] 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 }\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 }\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"],"mappings":";AAAA,SAAS,aAA6B;;;ACQ/B,IAAM,sBAAsB,CAAC,gBAAgB,QAAQ,WAAW,QAAQ,OAAO;AAc/E,SAAS,sBACd,UACA,kBAAkB,MACR;AACV,QAAM,SAAmB,CAAC;AAG1B,MAAI,iBAAiB;AACnB,eAAW,OAAO,qBAAqB;AACrC,aAAO,KAAK,MAAM,GAAG,KAAK;AAAA,IAC5B;AAAA,EACF;AAGA,aAAW,WAAW,UAAU;AAC9B,QAAI,QAAQ,WAAW,KAAK,KAAK,QAAQ,SAAS,KAAK,GAAG;AAExD,aAAO,KAAK,OAAO;AAAA,IACrB,WAAW,QAAQ,SAAS,KAAK,GAAG;AAElC,aAAO,KAAK,MAAM,OAAO,EAAE;AAAA,IAC7B,WAAW,QAAQ,WAAW,IAAI,GAAG;AAEnC,aAAO,KAAK,MAAM,OAAO,EAAE;AAAA,IAC7B,WAAW,CAAC,QAAQ,SAAS,GAAG,KAAK,CAAC,QAAQ,SAAS,GAAG,GAAG;AAE3D,aAAO,KAAK,MAAM,OAAO,KAAK;AAAA,IAChC,OAAO;AAEL,aAAO,KAAK,OAAO;AAAA,IACrB;AAAA,EACF;AAEA,SAAO;AACT;AAqBO,SAAS,+BACd,UACA,kBAAkB,MACA;AAClB,QAAM,OAAO,oBAAI,IAAY;AAC7B,QAAM,eAAqD,CAAC;AAG5D,MAAI,iBAAiB;AACnB,eAAW,OAAO,qBAAqB;AACrC,WAAK,IAAI,GAAG;AAAA,IACd;AAAA,EACF;AAGA,aAAW,WAAW,UAAU;AAC9B,QAAI,QAAQ,WAAW,KAAK,KAAK,QAAQ,SAAS,KAAK,GAAG;AAExD,YAAM,QAAQ,QAAQ,MAAM,GAAG,EAAE;AACjC,UAAI,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,SAAS,GAAG,GAA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