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.
Files changed (50) hide show
  1. package/.env.example +7 -0
  2. package/CHANGELOG.md +143 -108
  3. package/README.md +288 -221
  4. package/dist/chat/nativeChatParticipant.js +1 -1
  5. package/dist/cli/flowCommand.js +175 -0
  6. package/dist/cli/main.js +1810 -0
  7. package/dist/cli/mcpServer.js +7 -1
  8. package/dist/cli/runEvaluation.js +281 -2
  9. package/dist/config/defaultConfig.js +11 -1
  10. package/dist/config/env.js +118 -0
  11. package/dist/config/loadConfig.js +18 -1
  12. package/dist/config/loadConfigFromPath.js +3 -1
  13. package/dist/eval/accuracyV2.js +483 -0
  14. package/dist/eval/goldenTask.js +192 -0
  15. package/dist/extension.js +23 -0
  16. package/dist/framework/laravel.js +177 -0
  17. package/dist/gateway/embeddingProviders.js +852 -0
  18. package/dist/index/cacheStore.js +43 -0
  19. package/dist/index/configRouteDiscoveryProbe.js +288 -0
  20. package/dist/index/embeddingIndex.js +193 -0
  21. package/dist/index/graphIndex.js +460 -0
  22. package/dist/index/indexWatcher.js +86 -0
  23. package/dist/index/semanticChunkIndex.js +388 -0
  24. package/dist/index/structuredExtractor.js +303 -12
  25. package/dist/index/treeSitterExtractor.js +264 -0
  26. package/dist/index/vectorStore.js +41 -0
  27. package/dist/index/workspaceIndex.js +901 -26
  28. package/dist/mcp/mcpTools.js +1678 -2
  29. package/dist/pipeline/contextBlueprint.js +15 -2
  30. package/dist/pipeline/contextPack.js +3 -3
  31. package/dist/pipeline/deterministicReranker.js +358 -0
  32. package/dist/pipeline/evaluationMetrics.js +14 -2
  33. package/dist/pipeline/fileGroups.js +7 -1
  34. package/dist/pipeline/fileScanner.js +209 -12
  35. package/dist/pipeline/fusionTrace.js +149 -0
  36. package/dist/pipeline/llmReranker.js +151 -0
  37. package/dist/pipeline/nodeScan.js +102 -12
  38. package/dist/pipeline/ranker.js +875 -16
  39. package/dist/pipeline/retrievalFusion.js +41 -0
  40. package/dist/pipeline/roleRefinement.js +62 -0
  41. package/dist/pipeline/runHeadless.js +60 -5
  42. package/dist/pipeline/runPipeline.js +2 -2
  43. package/dist/pipeline/solvePacket.js +656 -43
  44. package/dist/pipeline/subsystem.js +21 -0
  45. package/dist/pipeline/taskUnderstanding.js +2 -2
  46. package/dist/ui/chatViewProvider.js +1 -1
  47. package/docs/demo-screenshot-checklist.md +86 -0
  48. package/docs/marketplace-copy.md +92 -0
  49. package/docs/mcp-onboarding.md +191 -0
  50. package/package.json +633 -561
@@ -119,7 +119,31 @@ async function nodeScanWorkspace(workspacePath, profile, config, options = {}) {
119
119
  indexedTokens: discovery.indexedTokens,
120
120
  candidateFiles: discovery.candidateFiles,
121
121
  indexReusedFiles: discovery.indexReusedFiles,
122
- indexUpdatedFiles: discovery.indexUpdatedFiles
122
+ indexUpdatedFiles: discovery.indexUpdatedFiles,
123
+ indexDeletedFiles: discovery.indexDeletedFiles,
124
+ indexDurationMs: discovery.indexDurationMs,
125
+ indexStatus: discovery.indexStatus,
126
+ partialReason: discovery.partialReason,
127
+ semanticRetrievalStatus: discovery.semanticRetrievalStatus,
128
+ semanticProvider: config.index.semanticProvider || "none",
129
+ semanticModel: config.index.semanticModel || "(empty)",
130
+ semanticErrorType: discovery.semanticErrorType,
131
+ semanticErrorMessage: discovery.semanticErrorMessage,
132
+ semanticEmbeddedFiles: discovery.semanticEmbeddedFiles ?? 0,
133
+ semanticCacheHits: discovery.semanticCacheHits ?? 0,
134
+ semanticCacheMisses: discovery.semanticCacheMisses ?? 0,
135
+ semanticHitCount: discovery.semanticHitCount ?? 0,
136
+ semanticAddedFileCount: discovery.semanticAddedFileCount ?? 0,
137
+ semanticSupportedFileCount: discovery.semanticSupportedFileCount ?? 0,
138
+ semanticFallbackUsed: discovery.semanticRetrievalStatus === "error_fallback",
139
+ deepCandidateDiscoveryCandidates: discovery.deepCandidateDiscoveryCandidates ?? 0,
140
+ deepCandidateDiscoveryAdded: discovery.deepCandidateDiscoveryAdded ?? 0,
141
+ deepCandidateDiscoveryAvoidBlocked: discovery.deepCandidateDiscoveryAvoidBlocked ?? 0,
142
+ // Chunk stats (15D)
143
+ totalChunks: discovery.totalChunks ?? 0,
144
+ chunksByKind: discovery.chunksByKind ?? {},
145
+ filesWithChunks: discovery.filesWithChunks ?? 0,
146
+ parserKindCounts: discovery.parserKindCounts ?? {},
123
147
  }
124
148
  };
125
149
  }
@@ -136,15 +160,26 @@ async function discoverScanFiles(rootPath, profile, config, startedAt, options)
136
160
  if (!config.index.enableWorkspaceIndex) {
137
161
  return (0, fileDiscovery_1.discoverWorkspaceFiles)(rootPath, config, { startedAt, shouldCancel: options.shouldCancel });
138
162
  }
163
+ const idxStart = Date.now();
139
164
  const indexed = await (0, workspaceIndex_1.loadOrBuildWorkspaceIndex)(rootPath, config, {
140
165
  startedAt,
141
166
  shouldCancel: options.shouldCancel,
142
- onProgress: options.onProgress
167
+ onProgress: options.onProgress,
168
+ readOnly: options.readOnly
143
169
  });
144
- const candidates = (0, workspaceIndex_1.selectIndexCandidates)(indexed.index, profile, config);
170
+ const indexDurationMs = Date.now() - idxStart;
171
+ const selection = await (0, workspaceIndex_1.selectIndexCandidates)(indexed.index, profile, config);
172
+ const candidates = selection.files;
173
+ const semanticRetrievalStatus = selection.semanticStatus;
174
+ const semanticErrorType = selection.semanticErrorType;
175
+ const semanticErrorMessage = selection.semanticErrorMessage;
176
+ const deepCands = selection.deepCandidateDiscoveryCandidates ?? 0;
177
+ const deepAdded = selection.deepCandidateDiscoveryAdded ?? 0;
178
+ const deepBlocked = selection.deepCandidateDiscoveryAvoidBlocked ?? 0;
145
179
  const files = candidates.length > 0
146
180
  ? candidates
147
181
  : fallbackIndexCandidates(rootPath, indexed.index.files, config.index.maxIndexedCandidateFiles);
182
+ const chunkStats = (0, workspaceIndex_1.computeChunkStats)(indexed.index);
148
183
  return {
149
184
  files,
150
185
  stopReason: indexed.stopReason,
@@ -154,7 +189,28 @@ async function discoverScanFiles(rootPath, profile, config, startedAt, options)
154
189
  indexedTokens: indexed.indexedTokens,
155
190
  candidateFiles: files.length,
156
191
  indexReusedFiles: indexed.reusedFiles,
157
- indexUpdatedFiles: indexed.updatedFiles
192
+ indexUpdatedFiles: indexed.updatedFiles,
193
+ indexDeletedFiles: indexed.deletedFiles,
194
+ indexStatus: indexed.stopReason ? "partial" : "fresh",
195
+ indexDurationMs,
196
+ partialReason: indexed.stopReason,
197
+ semanticRetrievalStatus,
198
+ semanticErrorType,
199
+ semanticErrorMessage,
200
+ semanticEmbeddedFiles: selection.semanticEmbeddedFiles ?? 0,
201
+ semanticCacheHits: selection.semanticCacheHits ?? 0,
202
+ semanticCacheMisses: selection.semanticCacheMisses ?? 0,
203
+ semanticHitCount: selection.semanticHitCount ?? 0,
204
+ semanticAddedFileCount: selection.semanticAddedFileCount ?? 0,
205
+ semanticSupportedFileCount: selection.semanticSupportedFileCount ?? 0,
206
+ deepCandidateDiscoveryCandidates: deepCands,
207
+ deepCandidateDiscoveryAdded: deepAdded,
208
+ deepCandidateDiscoveryAvoidBlocked: deepBlocked,
209
+ // Chunk stats (15D)
210
+ totalChunks: chunkStats.totalChunks,
211
+ chunksByKind: chunkStats.chunksByKind,
212
+ filesWithChunks: chunkStats.filesWithChunks,
213
+ parserKindCounts: chunkStats.parserKindCounts,
158
214
  };
159
215
  }
160
216
  function fallbackIndexCandidates(rootPath, files, maxFiles) {
@@ -202,15 +258,49 @@ async function scanNodeFile(file, profile, config) {
202
258
  if (content.includes("\u0000")) {
203
259
  return { units: [], scanned: false, size: stat.size, tokenCount: 0 };
204
260
  }
261
+ var units = (0, fileScanner_1.scanTextFile)({
262
+ file: file.absolutePath,
263
+ relativePath: file.relativePath,
264
+ content,
265
+ size: stat.size,
266
+ profile,
267
+ config,
268
+ channelHits: file.channelHits,
269
+ retrievalTrace: file.retrievalTrace,
270
+ graphReasons: file.graphReasons
271
+ });
272
+ // Fallback: if a selected file has graphReasons but produced no units, create
273
+ // one minimal unit so the semantic evidence (discovered by semantic) is visible.
274
+ if (units.length === 0 && file.graphReasons && file.graphReasons.length > 0) {
275
+ units = [{
276
+ id: file.relativePath,
277
+ file: file.absolutePath,
278
+ relativePath: file.relativePath,
279
+ absolutePath: file.absolutePath,
280
+ size: stat.size,
281
+ kind: "file",
282
+ role: "read_context",
283
+ score: 0,
284
+ confidence: 0,
285
+ tier: "low",
286
+ reasons: [],
287
+ matchedTerms: [],
288
+ retrievalPasses: file.retrievalTrace ?? [],
289
+ imports: [],
290
+ channelHits: file.channelHits,
291
+ graphReasons: file.graphReasons,
292
+ lines: "0-0",
293
+ context: "",
294
+ contrastContext: false,
295
+ symbols: [],
296
+ symbolMatches: [],
297
+ subsystem: undefined,
298
+ subsystemTerms: [],
299
+ extractorKind: undefined
300
+ }];
301
+ }
205
302
  return {
206
- units: (0, fileScanner_1.scanTextFile)({
207
- file: file.absolutePath,
208
- relativePath: file.relativePath,
209
- content,
210
- size: stat.size,
211
- profile,
212
- config
213
- }),
303
+ units,
214
304
  scanned: true,
215
305
  size: stat.size,
216
306
  tokenCount: (0, text_1.fastTokenEstimate)(`${file.relativePath}\n${content}`)