bluera-knowledge 0.9.30 → 0.9.31

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bluera-knowledge",
3
- "version": "0.9.30",
3
+ "version": "0.9.31",
4
4
  "description": "Clone repos, crawl docs, search locally. Fast, authoritative answers for AI coding agents without web lookups.",
5
5
  "author": {
6
6
  "name": "Bluera Inc",
package/BUGS-FOUND.md ADDED
@@ -0,0 +1,71 @@
1
+ # Bugs Found During API Testing (v0.9.30)
2
+
3
+ ## Fix Status
4
+
5
+ | Bug | Status | Tests Added | Notes |
6
+ |-----|--------|-------------|-------|
7
+ | #1 | **FIXED** | ✅ | URL detection in store.ts |
8
+ | #2 | **PARTIAL** | ✅ | Mutex crash - CLI only, not affecting plugin |
9
+ | #3 | **FIXED** | ✅ | Empty name validation added |
10
+
11
+ ---
12
+
13
+ ## Bug #1: `store create --type repo --source <url>` doesn't clone repos
14
+
15
+ **Status:** FIXED
16
+
17
+ **File:** `src/cli/commands/store.ts:58-65`
18
+
19
+ **Fix:** Added URL detection to route to `url` parameter instead of `path`:
20
+ ```typescript
21
+ const isUrl = options.source.startsWith('http://') || options.source.startsWith('https://');
22
+ ```
23
+
24
+ ---
25
+
26
+ ## Bug #2: Non-existent store lookup causes mutex crash (CLI only)
27
+
28
+ **Status:** PARTIALLY FIXED - Does not affect Claude Code plugin
29
+
30
+ **Note:** This bug only affects the npm CLI package, not the Claude Code plugin. The MCP server is a long-running process that doesn't call `destroyServices()` on each request.
31
+
32
+ **Fixes applied:**
33
+ 1. Added `close()` method to LanceStore that calls `connection.close()`
34
+ 2. Added try-catch around cleanup in `destroyServices()`
35
+ 3. Moved `process.exit()` after `finally` block
36
+
37
+ **Remaining issue:** Native code mutex crash still occurs during CLI cleanup. This appears to be a race condition in LanceDB's native code during process exit.
38
+
39
+ ---
40
+
41
+ ## Bug #3: Empty store name accepted
42
+
43
+ **Status:** FIXED
44
+
45
+ **File:** `src/services/store.service.ts:39-42`
46
+
47
+ **Fix:** Added validation at start of `create()`:
48
+ ```typescript
49
+ if (!input.name || input.name.trim() === '') {
50
+ return err(new Error('Store name cannot be empty'));
51
+ }
52
+ ```
53
+
54
+ ---
55
+
56
+ ## Files Modified
57
+
58
+ 1. `src/cli/commands/store.ts` - Bug #1 fix (URL detection)
59
+ 2. `src/db/lance.ts` - Bug #2 fix (added close() method)
60
+ 3. `src/services/index.ts` - Bug #2 fix (cleanup with try-catch)
61
+ 4. `src/services/store.service.ts` - Bug #3 fix (empty name validation)
62
+
63
+ ---
64
+
65
+ ## Test Results After Fixes
66
+
67
+ | Feature | Status |
68
+ |---------|--------|
69
+ | `store create --type repo --source <url>` | **FIXED** - Now clones correctly |
70
+ | Empty store name validation | **FIXED** - Returns error |
71
+ | Mutex crash on error (CLI) | PARTIAL - Still crashes but doesn't affect plugin |
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [0.9.31](https://github.com/blueraai/bluera-knowledge/compare/v0.9.30...v0.9.31) (2026-01-06)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * address three bugs found during API testing ([862b7e6](https://github.com/blueraai/bluera-knowledge/commit/862b7e67c057c004ae788d9205c147b422339c67)), closes [#1](https://github.com/blueraai/bluera-knowledge/issues/1) [#2](https://github.com/blueraai/bluera-knowledge/issues/2) [#3](https://github.com/blueraai/bluera-knowledge/issues/3)
11
+
5
12
  ## [0.9.30](https://github.com/blueraai/bluera-knowledge/compare/v0.9.26...v0.9.30) (2026-01-06)
6
13
 
7
14
 
@@ -3,7 +3,7 @@ import {
3
3
  createLogger,
4
4
  summarizePayload,
5
5
  truncateForLog
6
- } from "./chunk-NJUMU4X2.js";
6
+ } from "./chunk-RWSXP3PQ.js";
7
7
 
8
8
  // src/crawl/intelligent-crawler.ts
9
9
  import { EventEmitter } from "events";
@@ -718,4 +718,4 @@ var IntelligentCrawler = class extends EventEmitter {
718
718
  export {
719
719
  IntelligentCrawler
720
720
  };
721
- //# sourceMappingURL=chunk-DNOIM7BO.js.map
721
+ //# sourceMappingURL=chunk-2SJHNRXD.js.map
@@ -4,7 +4,7 @@ import {
4
4
  createServices,
5
5
  createStoreId,
6
6
  summarizePayload
7
- } from "./chunk-NJUMU4X2.js";
7
+ } from "./chunk-RWSXP3PQ.js";
8
8
 
9
9
  // src/mcp/server.ts
10
10
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
@@ -1020,4 +1020,4 @@ export {
1020
1020
  createMCPServer,
1021
1021
  runMCPServer
1022
1022
  };
1023
- //# sourceMappingURL=chunk-SZNTYLYT.js.map
1023
+ //# sourceMappingURL=chunk-OGEY66FZ.js.map
@@ -569,6 +569,9 @@ var StoreService = class {
569
569
  await this.loadRegistry();
570
570
  }
571
571
  async create(input) {
572
+ if (!input.name || input.name.trim() === "") {
573
+ return err(new Error("Store name cannot be empty"));
574
+ }
572
575
  const existing = await this.getByName(input.name);
573
576
  if (existing !== void 0) {
574
577
  return err(new Error(`Store with name "${input.name}" already exists`));
@@ -3593,6 +3596,13 @@ var LanceStore = class {
3593
3596
  this.tables.delete(tableName);
3594
3597
  }
3595
3598
  }
3599
+ close() {
3600
+ this.tables.clear();
3601
+ if (this.connection !== null) {
3602
+ this.connection.close();
3603
+ this.connection = null;
3604
+ }
3605
+ }
3596
3606
  getTableName(storeId) {
3597
3607
  return `documents_${storeId}`;
3598
3608
  }
@@ -3950,7 +3960,16 @@ async function createServices(configPath, dataDir, projectRoot) {
3950
3960
  }
3951
3961
  async function destroyServices(services) {
3952
3962
  logger4.info("Shutting down services");
3953
- await services.pythonBridge.stop();
3963
+ try {
3964
+ services.lance.close();
3965
+ } catch (e) {
3966
+ logger4.error({ error: e }, "Error closing LanceStore");
3967
+ }
3968
+ try {
3969
+ await services.pythonBridge.stop();
3970
+ } catch (e) {
3971
+ logger4.error({ error: e }, "Error stopping Python bridge");
3972
+ }
3954
3973
  await shutdownLogger();
3955
3974
  }
3956
3975
 
@@ -3971,4 +3990,4 @@ export {
3971
3990
  createServices,
3972
3991
  destroyServices
3973
3992
  };
3974
- //# sourceMappingURL=chunk-NJUMU4X2.js.map
3993
+ //# sourceMappingURL=chunk-RWSXP3PQ.js.map