bluera-knowledge 0.11.18 → 0.11.19
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 +27 -0
- package/dist/{chunk-ZDEO4WJT.js → chunk-GOAOBPOA.js} +22 -70
- package/dist/chunk-GOAOBPOA.js.map +1 -0
- package/dist/{chunk-6FHWC36B.js → chunk-HRQD3MPH.js} +8 -6
- package/dist/chunk-HRQD3MPH.js.map +1 -0
- package/dist/{chunk-ZZNABJMQ.js → chunk-QEHSDQTL.js} +79 -13
- package/dist/chunk-QEHSDQTL.js.map +1 -0
- package/dist/{chunk-5NUI6JL6.js → chunk-VP4VZULK.js} +2 -2
- package/dist/index.js +36 -18
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.js +3 -3
- package/dist/watch.service-OPLKIDFQ.js +7 -0
- package/dist/workers/background-worker-cli.js +3 -3
- package/package.json +1 -1
- package/src/cli/commands/crawl.ts +1 -1
- package/src/cli/commands/index-cmd.test.ts +14 -4
- package/src/cli/commands/index-cmd.ts +11 -4
- package/src/cli/commands/store.test.ts +211 -18
- package/src/cli/commands/store.ts +26 -8
- package/src/crawl/article-converter.test.ts +30 -61
- package/src/crawl/article-converter.ts +2 -8
- package/src/crawl/bridge.test.ts +14 -0
- package/src/crawl/bridge.ts +17 -5
- package/src/crawl/intelligent-crawler.test.ts +65 -76
- package/src/crawl/intelligent-crawler.ts +33 -69
- package/src/plugin/git-clone.test.ts +44 -0
- package/src/plugin/git-clone.ts +4 -0
- package/src/services/code-unit.service.test.ts +59 -6
- package/src/services/code-unit.service.ts +47 -2
- package/src/services/index.ts +19 -3
- package/src/services/job.service.test.ts +10 -7
- package/src/services/job.service.ts +12 -6
- package/src/services/services.test.ts +19 -6
- package/src/services/watch.service.test.ts +80 -56
- package/src/services/watch.service.ts +9 -6
- package/dist/chunk-6FHWC36B.js.map +0 -1
- package/dist/chunk-ZDEO4WJT.js.map +0 -1
- package/dist/chunk-ZZNABJMQ.js.map +0 -1
- package/dist/watch.service-BJV3TI3F.js +0 -7
- /package/dist/{chunk-5NUI6JL6.js.map → chunk-VP4VZULK.js.map} +0 -0
- /package/dist/{watch.service-BJV3TI3F.js.map → watch.service-OPLKIDFQ.js.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
createServices,
|
|
7
7
|
createStoreId,
|
|
8
8
|
summarizePayload
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QEHSDQTL.js";
|
|
10
10
|
|
|
11
11
|
// src/mcp/server.ts
|
|
12
12
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
@@ -2096,4 +2096,4 @@ export {
|
|
|
2096
2096
|
createMCPServer,
|
|
2097
2097
|
runMCPServer
|
|
2098
2098
|
};
|
|
2099
|
-
//# sourceMappingURL=chunk-
|
|
2099
|
+
//# sourceMappingURL=chunk-VP4VZULK.js.map
|
package/dist/index.js
CHANGED
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
isRepoStoreDefinition,
|
|
7
7
|
isWebStoreDefinition,
|
|
8
8
|
runMCPServer
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VP4VZULK.js";
|
|
10
10
|
import {
|
|
11
11
|
IntelligentCrawler
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GOAOBPOA.js";
|
|
13
13
|
import {
|
|
14
14
|
ASTParser,
|
|
15
15
|
AdapterRegistry,
|
|
@@ -22,8 +22,8 @@ import {
|
|
|
22
22
|
err,
|
|
23
23
|
extractRepoName,
|
|
24
24
|
ok
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-QEHSDQTL.js";
|
|
26
|
+
import "./chunk-HRQD3MPH.js";
|
|
27
27
|
|
|
28
28
|
// src/index.ts
|
|
29
29
|
import { homedir as homedir2 } from "os";
|
|
@@ -74,7 +74,7 @@ function createCrawlCommand(getOptions) {
|
|
|
74
74
|
} else {
|
|
75
75
|
store = existingStore;
|
|
76
76
|
}
|
|
77
|
-
const maxPages = cmdOptions.maxPages !== void 0 ? parseInt(cmdOptions.maxPages) : 50;
|
|
77
|
+
const maxPages = cmdOptions.maxPages !== void 0 ? parseInt(cmdOptions.maxPages, 10) : 50;
|
|
78
78
|
const isInteractive = process.stdout.isTTY && globalOpts.quiet !== true && globalOpts.format !== "json";
|
|
79
79
|
let spinner;
|
|
80
80
|
if (isInteractive) {
|
|
@@ -263,16 +263,23 @@ function createIndexCommand(getOptions) {
|
|
|
263
263
|
console.error(`Error: File/repo store not found: ${storeIdOrName}`);
|
|
264
264
|
process.exit(3);
|
|
265
265
|
}
|
|
266
|
-
const { WatchService } = await import("./watch.service-
|
|
266
|
+
const { WatchService } = await import("./watch.service-OPLKIDFQ.js");
|
|
267
267
|
const watchService = new WatchService(services.index, services.lance);
|
|
268
268
|
if (globalOpts.quiet !== true) {
|
|
269
269
|
console.log(`Watching ${store.name} for changes...`);
|
|
270
270
|
}
|
|
271
|
-
await watchService.watch(
|
|
272
|
-
|
|
273
|
-
|
|
271
|
+
await watchService.watch(
|
|
272
|
+
store,
|
|
273
|
+
parseInt(options.debounce ?? "1000", 10),
|
|
274
|
+
() => {
|
|
275
|
+
if (globalOpts.quiet !== true) {
|
|
276
|
+
console.log(`Re-indexed ${store.name}`);
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
(error) => {
|
|
280
|
+
console.error(`Watch error: ${error.message}`);
|
|
274
281
|
}
|
|
275
|
-
|
|
282
|
+
);
|
|
276
283
|
process.on("SIGINT", () => {
|
|
277
284
|
void (async () => {
|
|
278
285
|
await watchService.unwatchAll();
|
|
@@ -1523,18 +1530,20 @@ Created store: ${result.data.name} (${result.data.id})
|
|
|
1523
1530
|
await destroyServices(services);
|
|
1524
1531
|
}
|
|
1525
1532
|
if (exitCode !== 0) {
|
|
1526
|
-
process.
|
|
1533
|
+
process.exitCode = exitCode;
|
|
1527
1534
|
}
|
|
1528
1535
|
}
|
|
1529
1536
|
);
|
|
1530
1537
|
store.command("info <store>").description("Show store details: ID, type, path/URL, timestamps").action(async (storeIdOrName) => {
|
|
1531
1538
|
const globalOpts = getOptions();
|
|
1532
1539
|
const services = await createServices(globalOpts.config, globalOpts.dataDir);
|
|
1533
|
-
|
|
1540
|
+
let exitCode = 0;
|
|
1541
|
+
storeInfo: try {
|
|
1534
1542
|
const s = await services.store.getByIdOrName(storeIdOrName);
|
|
1535
1543
|
if (s === void 0) {
|
|
1536
1544
|
console.error(`Error: Store not found: ${storeIdOrName}`);
|
|
1537
|
-
|
|
1545
|
+
exitCode = 3;
|
|
1546
|
+
break storeInfo;
|
|
1538
1547
|
}
|
|
1539
1548
|
if (globalOpts.format === "json") {
|
|
1540
1549
|
console.log(JSON.stringify(s, null, 2));
|
|
@@ -1553,15 +1562,20 @@ Store: ${s.name}`);
|
|
|
1553
1562
|
} finally {
|
|
1554
1563
|
await destroyServices(services);
|
|
1555
1564
|
}
|
|
1565
|
+
if (exitCode !== 0) {
|
|
1566
|
+
process.exitCode = exitCode;
|
|
1567
|
+
}
|
|
1556
1568
|
});
|
|
1557
1569
|
store.command("delete <store>").description("Remove store and its indexed documents from LanceDB").option("-f, --force", "Delete without confirmation prompt").option("-y, --yes", "Alias for --force").action(async (storeIdOrName, options) => {
|
|
1558
1570
|
const globalOpts = getOptions();
|
|
1559
1571
|
const services = await createServices(globalOpts.config, globalOpts.dataDir);
|
|
1560
|
-
|
|
1572
|
+
let exitCode = 0;
|
|
1573
|
+
storeDelete: try {
|
|
1561
1574
|
const s = await services.store.getByIdOrName(storeIdOrName);
|
|
1562
1575
|
if (s === void 0) {
|
|
1563
1576
|
console.error(`Error: Store not found: ${storeIdOrName}`);
|
|
1564
|
-
|
|
1577
|
+
exitCode = 3;
|
|
1578
|
+
break storeDelete;
|
|
1565
1579
|
}
|
|
1566
1580
|
const skipConfirmation = options.force === true || options.yes === true;
|
|
1567
1581
|
if (!skipConfirmation) {
|
|
@@ -1569,7 +1583,8 @@ Store: ${s.name}`);
|
|
|
1569
1583
|
console.error(
|
|
1570
1584
|
"Error: Use --force or -y to delete without confirmation in non-interactive mode"
|
|
1571
1585
|
);
|
|
1572
|
-
|
|
1586
|
+
exitCode = 1;
|
|
1587
|
+
break storeDelete;
|
|
1573
1588
|
}
|
|
1574
1589
|
const readline = await import("readline");
|
|
1575
1590
|
const rl = readline.createInterface({
|
|
@@ -1582,7 +1597,7 @@ Store: ${s.name}`);
|
|
|
1582
1597
|
rl.close();
|
|
1583
1598
|
if (answer.toLowerCase() !== "y" && answer.toLowerCase() !== "yes") {
|
|
1584
1599
|
console.log("Cancelled.");
|
|
1585
|
-
|
|
1600
|
+
break storeDelete;
|
|
1586
1601
|
}
|
|
1587
1602
|
}
|
|
1588
1603
|
const result = await services.store.delete(s.id);
|
|
@@ -1590,11 +1605,14 @@ Store: ${s.name}`);
|
|
|
1590
1605
|
console.log(`Deleted store: ${s.name}`);
|
|
1591
1606
|
} else {
|
|
1592
1607
|
console.error(`Error: ${result.error.message}`);
|
|
1593
|
-
|
|
1608
|
+
exitCode = 1;
|
|
1594
1609
|
}
|
|
1595
1610
|
} finally {
|
|
1596
1611
|
await destroyServices(services);
|
|
1597
1612
|
}
|
|
1613
|
+
if (exitCode !== 0) {
|
|
1614
|
+
process.exitCode = exitCode;
|
|
1615
|
+
}
|
|
1598
1616
|
});
|
|
1599
1617
|
return store;
|
|
1600
1618
|
}
|