bluera-knowledge 0.13.2 → 0.13.3
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/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +7 -0
- package/dist/{chunk-6ZVW2P2F.js → chunk-AJI5DCKY.js} +67 -50
- package/dist/{chunk-6ZVW2P2F.js.map → chunk-AJI5DCKY.js.map} +1 -1
- package/dist/{chunk-GCUKVV33.js → chunk-AOSDVRRH.js} +2 -2
- package/dist/{chunk-H5AKKHY7.js → chunk-XL2UHMBL.js} +2 -2
- package/dist/index.js +3 -3
- package/dist/mcp/server.js +2 -2
- package/dist/workers/background-worker-cli.js +2 -2
- package/package.json +1 -1
- package/src/crawl/bridge.test.ts +1 -1
- package/src/crawl/bridge.ts +25 -2
- /package/dist/{chunk-GCUKVV33.js.map → chunk-AOSDVRRH.js.map} +0 -0
- /package/dist/{chunk-H5AKKHY7.js.map → chunk-XL2UHMBL.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
createLogger,
|
|
4
4
|
summarizePayload,
|
|
5
5
|
truncateForLog
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AJI5DCKY.js";
|
|
7
7
|
|
|
8
8
|
// src/crawl/intelligent-crawler.ts
|
|
9
9
|
import { EventEmitter } from "events";
|
|
@@ -753,4 +753,4 @@ var IntelligentCrawler = class extends EventEmitter {
|
|
|
753
753
|
export {
|
|
754
754
|
IntelligentCrawler
|
|
755
755
|
};
|
|
756
|
-
//# sourceMappingURL=chunk-
|
|
756
|
+
//# sourceMappingURL=chunk-AOSDVRRH.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
createStoreId,
|
|
8
8
|
destroyServices,
|
|
9
9
|
summarizePayload
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AJI5DCKY.js";
|
|
11
11
|
|
|
12
12
|
// src/mcp/server.ts
|
|
13
13
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
@@ -2151,4 +2151,4 @@ export {
|
|
|
2151
2151
|
createMCPServer,
|
|
2152
2152
|
runMCPServer
|
|
2153
2153
|
};
|
|
2154
|
-
//# sourceMappingURL=chunk-
|
|
2154
|
+
//# sourceMappingURL=chunk-XL2UHMBL.js.map
|
package/dist/index.js
CHANGED
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
isWebStoreDefinition,
|
|
8
8
|
runMCPServer,
|
|
9
9
|
spawnBackgroundWorker
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XL2UHMBL.js";
|
|
11
11
|
import {
|
|
12
12
|
IntelligentCrawler
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AOSDVRRH.js";
|
|
14
14
|
import {
|
|
15
15
|
ASTParser,
|
|
16
16
|
AdapterRegistry,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
err,
|
|
25
25
|
extractRepoName,
|
|
26
26
|
ok
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-AJI5DCKY.js";
|
|
28
28
|
import "./chunk-HRQD3MPH.js";
|
|
29
29
|
|
|
30
30
|
// src/index.ts
|
package/dist/mcp/server.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
IntelligentCrawler
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-AOSDVRRH.js";
|
|
5
5
|
import {
|
|
6
6
|
JobService,
|
|
7
7
|
createDocumentId,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
createStoreId,
|
|
11
11
|
destroyServices,
|
|
12
12
|
shutdownLogger
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-AJI5DCKY.js";
|
|
14
14
|
import "../chunk-HRQD3MPH.js";
|
|
15
15
|
|
|
16
16
|
// src/workers/background-worker-cli.ts
|
package/package.json
CHANGED
package/src/crawl/bridge.test.ts
CHANGED
package/src/crawl/bridge.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { spawn, type ChildProcess } from 'node:child_process';
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
|
+
import path from 'node:path';
|
|
3
4
|
import { createInterface, type Interface as ReadlineInterface } from 'node:readline';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
4
6
|
import { ZodError } from 'zod';
|
|
5
7
|
import {
|
|
6
8
|
type CrawlResult,
|
|
@@ -37,9 +39,30 @@ export class PythonBridge {
|
|
|
37
39
|
start(): Promise<void> {
|
|
38
40
|
if (this.process) return Promise.resolve();
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
// Compute absolute path to Python worker using import.meta.url
|
|
43
|
+
// This works both in development (src/) and production (dist/)
|
|
44
|
+
const currentFilePath = fileURLToPath(import.meta.url);
|
|
45
|
+
const isProduction = currentFilePath.includes('/dist/');
|
|
46
|
+
|
|
47
|
+
let pythonWorkerPath: string;
|
|
48
|
+
if (isProduction) {
|
|
49
|
+
// Production: Find dist dir and go to sibling python/ directory
|
|
50
|
+
const distIndex = currentFilePath.indexOf('/dist/');
|
|
51
|
+
const pluginRoot = currentFilePath.substring(0, distIndex);
|
|
52
|
+
pythonWorkerPath = path.join(pluginRoot, 'python', 'crawl_worker.py');
|
|
53
|
+
} else {
|
|
54
|
+
// Development: Go up from src/crawl to find python/
|
|
55
|
+
const srcDir = path.dirname(path.dirname(currentFilePath));
|
|
56
|
+
const projectRoot = path.dirname(srcDir);
|
|
57
|
+
pythonWorkerPath = path.join(projectRoot, 'python', 'crawl_worker.py');
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
logger.debug(
|
|
61
|
+
{ pythonWorkerPath, currentFilePath, isProduction },
|
|
62
|
+
'Starting Python bridge process'
|
|
63
|
+
);
|
|
41
64
|
|
|
42
|
-
this.process = spawn('python3', [
|
|
65
|
+
this.process = spawn('python3', [pythonWorkerPath], {
|
|
43
66
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
44
67
|
});
|
|
45
68
|
|
|
File without changes
|
|
File without changes
|