flowseeker 0.1.7 → 0.1.9
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/.env.example +7 -0
- package/CHANGELOG.md +143 -108
- package/README.md +288 -221
- package/dist/chat/nativeChatParticipant.js +1 -1
- package/dist/cli/flowCommand.js +175 -0
- package/dist/cli/main.js +1810 -0
- package/dist/cli/mcpServer.js +7 -1
- package/dist/cli/runEvaluation.js +281 -2
- package/dist/config/defaultConfig.js +11 -1
- package/dist/config/env.js +118 -0
- package/dist/config/loadConfig.js +18 -1
- package/dist/config/loadConfigFromPath.js +3 -1
- package/dist/eval/accuracyV2.js +483 -0
- package/dist/eval/goldenTask.js +192 -0
- package/dist/extension.js +23 -0
- package/dist/framework/laravel.js +177 -0
- package/dist/gateway/embeddingProviders.js +852 -0
- package/dist/index/cacheStore.js +43 -0
- package/dist/index/configRouteDiscoveryProbe.js +288 -0
- package/dist/index/embeddingIndex.js +193 -0
- package/dist/index/graphIndex.js +460 -0
- package/dist/index/indexWatcher.js +86 -0
- package/dist/index/semanticChunkIndex.js +388 -0
- package/dist/index/structuredExtractor.js +303 -12
- package/dist/index/treeSitterExtractor.js +264 -0
- package/dist/index/vectorStore.js +41 -0
- package/dist/index/workspaceIndex.js +901 -26
- package/dist/mcp/mcpTools.js +1678 -2
- package/dist/pipeline/contextBlueprint.js +15 -2
- package/dist/pipeline/contextPack.js +3 -3
- package/dist/pipeline/deterministicReranker.js +358 -0
- package/dist/pipeline/evaluationMetrics.js +14 -2
- package/dist/pipeline/fileGroups.js +7 -1
- package/dist/pipeline/fileScanner.js +209 -12
- package/dist/pipeline/fusionTrace.js +149 -0
- package/dist/pipeline/llmReranker.js +151 -0
- package/dist/pipeline/nodeScan.js +102 -12
- package/dist/pipeline/ranker.js +875 -16
- package/dist/pipeline/retrievalFusion.js +41 -0
- package/dist/pipeline/roleRefinement.js +62 -0
- package/dist/pipeline/runHeadless.js +60 -5
- package/dist/pipeline/runPipeline.js +2 -2
- package/dist/pipeline/solvePacket.js +656 -43
- package/dist/pipeline/subsystem.js +21 -0
- package/dist/pipeline/taskUnderstanding.js +2 -2
- package/dist/ui/chatViewProvider.js +1 -1
- package/docs/demo-screenshot-checklist.md +86 -0
- package/docs/marketplace-copy.md +92 -0
- package/docs/mcp-onboarding.md +191 -0
- package/package.json +633 -561
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InMemoryVectorStore = void 0;
|
|
4
|
+
exports.cosineSimilarity = cosineSimilarity;
|
|
5
|
+
class InMemoryVectorStore {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.records = new Map();
|
|
8
|
+
}
|
|
9
|
+
upsert(record) {
|
|
10
|
+
this.records.set(record.id, record);
|
|
11
|
+
}
|
|
12
|
+
search(vector, limit) {
|
|
13
|
+
return Array.from(this.records.values())
|
|
14
|
+
.map((record) => ({ record, score: cosineSimilarity(vector, record.vector) }))
|
|
15
|
+
.filter((item) => Number.isFinite(item.score))
|
|
16
|
+
.sort((left, right) => right.score - left.score)
|
|
17
|
+
.slice(0, limit);
|
|
18
|
+
}
|
|
19
|
+
size() {
|
|
20
|
+
return this.records.size;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.InMemoryVectorStore = InMemoryVectorStore;
|
|
24
|
+
function cosineSimilarity(left, right) {
|
|
25
|
+
if (left.length === 0 || left.length !== right.length) {
|
|
26
|
+
return 0;
|
|
27
|
+
}
|
|
28
|
+
let dot = 0;
|
|
29
|
+
let leftNorm = 0;
|
|
30
|
+
let rightNorm = 0;
|
|
31
|
+
for (let index = 0; index < left.length; index += 1) {
|
|
32
|
+
dot += left[index] * right[index];
|
|
33
|
+
leftNorm += left[index] * left[index];
|
|
34
|
+
rightNorm += right[index] * right[index];
|
|
35
|
+
}
|
|
36
|
+
if (leftNorm === 0 || rightNorm === 0) {
|
|
37
|
+
return 0;
|
|
38
|
+
}
|
|
39
|
+
return dot / (Math.sqrt(leftNorm) * Math.sqrt(rightNorm));
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=vectorStore.js.map
|