bluera-knowledge 0.11.9 → 0.11.11
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 +32 -0
- package/dist/{chunk-AHS2EILR.js → chunk-5NUI6JL6.js} +2 -2
- package/dist/{chunk-TTV7P7HG.js → chunk-ZDEO4WJT.js} +2 -2
- package/dist/{chunk-UB3L33JF.js → chunk-ZZNABJMQ.js} +6 -19
- package/dist/chunk-ZZNABJMQ.js.map +1 -0
- package/dist/index.js +129 -113
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.js +2 -2
- package/dist/workers/background-worker-cli.js +2 -2
- package/package.json +1 -1
- package/scripts/validate-npm-release.sh +24 -3
- package/src/plugin/commands.test.ts +2 -1
- package/src/plugin/commands.ts +194 -164
- package/src/scripts/validate-npm-release.test.ts +15 -0
- package/src/services/search.service.test.ts +12 -43
- package/src/services/search.service.ts +5 -18
- package/dist/chunk-UB3L33JF.js.map +0 -1
- /package/dist/{chunk-AHS2EILR.js.map → chunk-5NUI6JL6.js.map} +0 -0
- /package/dist/{chunk-TTV7P7HG.js.map → chunk-ZDEO4WJT.js.map} +0 -0
|
@@ -249,19 +249,11 @@ export class SearchService {
|
|
|
249
249
|
|
|
250
250
|
/**
|
|
251
251
|
* Calculate confidence level based on max raw vector similarity score.
|
|
252
|
-
* Configurable via environment variables.
|
|
252
|
+
* Configurable via environment variables, with sensible defaults for CLI usage.
|
|
253
253
|
*/
|
|
254
254
|
private calculateConfidence(maxRawScore: number): SearchConfidence {
|
|
255
|
-
const
|
|
256
|
-
const
|
|
257
|
-
if (highEnv === undefined) {
|
|
258
|
-
throw new Error('SEARCH_CONFIDENCE_HIGH environment variable is required');
|
|
259
|
-
}
|
|
260
|
-
if (mediumEnv === undefined) {
|
|
261
|
-
throw new Error('SEARCH_CONFIDENCE_MEDIUM environment variable is required');
|
|
262
|
-
}
|
|
263
|
-
const highThreshold = parseFloat(highEnv);
|
|
264
|
-
const mediumThreshold = parseFloat(mediumEnv);
|
|
255
|
+
const highThreshold = parseFloat(process.env['SEARCH_CONFIDENCE_HIGH'] ?? '0.5');
|
|
256
|
+
const mediumThreshold = parseFloat(process.env['SEARCH_CONFIDENCE_MEDIUM'] ?? '0.3');
|
|
265
257
|
|
|
266
258
|
if (maxRawScore >= highThreshold) return 'high';
|
|
267
259
|
if (maxRawScore >= mediumThreshold) return 'medium';
|
|
@@ -759,14 +751,9 @@ export class SearchService {
|
|
|
759
751
|
case 'source-internal':
|
|
760
752
|
baseBoost = 0.75; // Internal implementation files (not too harsh)
|
|
761
753
|
break;
|
|
762
|
-
case 'test':
|
|
763
|
-
|
|
764
|
-
if (testBoostEnv === undefined) {
|
|
765
|
-
throw new Error('SEARCH_TEST_FILE_BOOST environment variable is required');
|
|
766
|
-
}
|
|
767
|
-
baseBoost = parseFloat(testBoostEnv);
|
|
754
|
+
case 'test':
|
|
755
|
+
baseBoost = parseFloat(process.env['SEARCH_TEST_FILE_BOOST'] ?? '0.5');
|
|
768
756
|
break;
|
|
769
|
-
}
|
|
770
757
|
case 'config':
|
|
771
758
|
baseBoost = 0.5; // Config files rarely answer questions
|
|
772
759
|
break;
|