bluera-knowledge 0.9.40 → 0.9.42

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.
@@ -3,7 +3,7 @@ import {
3
3
  createLogger,
4
4
  summarizePayload,
5
5
  truncateForLog
6
- } from "./chunk-HUEWT6U5.js";
6
+ } from "./chunk-DWAIT2OD.js";
7
7
 
8
8
  // src/crawl/intelligent-crawler.ts
9
9
  import { EventEmitter } from "events";
@@ -765,4 +765,4 @@ var IntelligentCrawler = class extends EventEmitter {
765
765
  export {
766
766
  IntelligentCrawler
767
767
  };
768
- //# sourceMappingURL=chunk-IZWOEBFM.js.map
768
+ //# sourceMappingURL=chunk-MQE32YY6.js.map
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runMCPServer
4
- } from "./chunk-TIGPI3BE.js";
4
+ } from "./chunk-CUHYSPRV.js";
5
5
  import {
6
6
  IntelligentCrawler
7
- } from "./chunk-IZWOEBFM.js";
7
+ } from "./chunk-MQE32YY6.js";
8
8
  import {
9
9
  ASTParser,
10
10
  ChunkingService,
@@ -16,7 +16,7 @@ import {
16
16
  err,
17
17
  extractRepoName,
18
18
  ok
19
- } from "./chunk-HUEWT6U5.js";
19
+ } from "./chunk-DWAIT2OD.js";
20
20
  import "./chunk-6FHWC36B.js";
21
21
 
22
22
  // src/index.ts
@@ -1018,10 +1018,33 @@ Search: "${query}"`);
1018
1018
  console.log(` ${r.summary.location}`);
1019
1019
  console.log(` ${r.summary.purpose}`);
1020
1020
  if (r.context && options.detail !== "minimal") {
1021
- console.log(` Imports: ${r.context.keyImports.slice(0, 3).join(", ")}`);
1022
- console.log(
1023
- ` Related: ${r.context.relatedConcepts.slice(0, 3).join(", ")}`
1024
- );
1021
+ if (r.context.keyImports.length > 0) {
1022
+ console.log(` Imports: ${r.context.keyImports.slice(0, 3).join(", ")}`);
1023
+ }
1024
+ if (r.context.relatedConcepts.length > 0) {
1025
+ console.log(
1026
+ ` Related: ${r.context.relatedConcepts.slice(0, 3).join(", ")}`
1027
+ );
1028
+ }
1029
+ const { calledBy, calls } = r.context.usage;
1030
+ if (calledBy > 0 || calls > 0) {
1031
+ console.log(
1032
+ ` Usage: Called by ${String(calledBy)} | Calls ${String(calls)}`
1033
+ );
1034
+ }
1035
+ }
1036
+ if (r.full && options.detail === "full") {
1037
+ if (r.full.completeCode) {
1038
+ console.log(` ---`);
1039
+ const codeLines = r.full.completeCode.split("\n");
1040
+ console.log(` ${codeLines.slice(0, 10).join("\n ")}`);
1041
+ if (codeLines.length > 10) {
1042
+ console.log(` ... (truncated)`);
1043
+ }
1044
+ }
1045
+ if (r.full.documentation) {
1046
+ console.log(` Doc: ${r.full.documentation.slice(0, 100)}`);
1047
+ }
1025
1048
  }
1026
1049
  console.log();
1027
1050
  } else {
@@ -1039,7 +1062,7 @@ Search: "${query}"`);
1039
1062
  await destroyServices(services);
1040
1063
  }
1041
1064
  if (exitCode !== 0) {
1042
- process.exit(exitCode);
1065
+ process.exitCode = exitCode;
1043
1066
  }
1044
1067
  }
1045
1068
  );