flowseeker 0.1.7

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 (82) hide show
  1. package/CHANGELOG.md +111 -0
  2. package/COMPATIBILITY.md +281 -0
  3. package/LICENSE +21 -0
  4. package/README.md +375 -0
  5. package/dist/adapters/frameworkEdges.js +586 -0
  6. package/dist/agent/approvalPolicy.js +81 -0
  7. package/dist/agent/commandRunner.js +166 -0
  8. package/dist/agent/flowCommandRunner.js +124 -0
  9. package/dist/agent/mcpToolRunner.js +167 -0
  10. package/dist/auth/githubAuth.js +71 -0
  11. package/dist/auth/modelList.js +127 -0
  12. package/dist/auth/oauthHandler.js +377 -0
  13. package/dist/chat/nativeChatParticipant.js +616 -0
  14. package/dist/cli/mcpServer.js +383 -0
  15. package/dist/cli/runEvaluation.js +789 -0
  16. package/dist/cli/runReplay.js +481 -0
  17. package/dist/commands/checkHostCompatibility.js +149 -0
  18. package/dist/commands/copyAgentPrompt.js +52 -0
  19. package/dist/commands/copyContext.js +54 -0
  20. package/dist/commands/explainSelectionRelevance.js +57 -0
  21. package/dist/commands/findRelevantContext.js +127 -0
  22. package/dist/commands/openEvidence.js +49 -0
  23. package/dist/commands/openMcpConfig.js +81 -0
  24. package/dist/commands/openRelatedTests.js +54 -0
  25. package/dist/commands/rebuildIndex.js +45 -0
  26. package/dist/commands/runEvaluationSuite.js +323 -0
  27. package/dist/commands/runReplaySuite.js +228 -0
  28. package/dist/config/defaultConfig.js +72 -0
  29. package/dist/config/loadConfig.js +84 -0
  30. package/dist/config/loadConfigFromPath.js +60 -0
  31. package/dist/extension.js +513 -0
  32. package/dist/gateway/agentPrompts.js +176 -0
  33. package/dist/gateway/aiGateway.js +1255 -0
  34. package/dist/gateway/aiProviders.js +901 -0
  35. package/dist/gateway/contextExpansion.js +331 -0
  36. package/dist/gateway/editProposalStore.js +238 -0
  37. package/dist/gateway/planProposalStore.js +28 -0
  38. package/dist/index/cacheStore.js +51 -0
  39. package/dist/index/chunker.js +45 -0
  40. package/dist/index/dependencyExtractor.js +107 -0
  41. package/dist/index/fileDiscovery.js +177 -0
  42. package/dist/index/structuredExtractor.js +256 -0
  43. package/dist/index/workspaceIndex.js +518 -0
  44. package/dist/mcp/mcpConfig.js +154 -0
  45. package/dist/mcp/mcpProvider.js +109 -0
  46. package/dist/mcp/mcpTools.js +215 -0
  47. package/dist/pipeline/agentPrompt.js +79 -0
  48. package/dist/pipeline/agentPromptHeadless.js +85 -0
  49. package/dist/pipeline/contextBlueprint.js +346 -0
  50. package/dist/pipeline/contextPack.js +80 -0
  51. package/dist/pipeline/diffPreview.js +79 -0
  52. package/dist/pipeline/evaluationMetrics.js +154 -0
  53. package/dist/pipeline/evidenceGraph.js +389 -0
  54. package/dist/pipeline/feedback.js +215 -0
  55. package/dist/pipeline/fileGroups.js +84 -0
  56. package/dist/pipeline/fileScanner.js +866 -0
  57. package/dist/pipeline/nodeScan.js +219 -0
  58. package/dist/pipeline/ranker.js +563 -0
  59. package/dist/pipeline/responseLanguage.js +39 -0
  60. package/dist/pipeline/retrievalPlan.js +163 -0
  61. package/dist/pipeline/runHeadless.js +54 -0
  62. package/dist/pipeline/runPipeline.js +114 -0
  63. package/dist/pipeline/solvePacket.js +382 -0
  64. package/dist/pipeline/subsystem.js +257 -0
  65. package/dist/pipeline/taskUnderstanding.js +453 -0
  66. package/dist/pipeline/tokenSavings.js +146 -0
  67. package/dist/pipeline/universalScan.js +216 -0
  68. package/dist/pipeline/verifyAfterApply.js +233 -0
  69. package/dist/runtime/capabilities.js +71 -0
  70. package/dist/runtime/hostDetect.js +98 -0
  71. package/dist/runtime/hostTier.js +68 -0
  72. package/dist/runtime/statusBar.js +80 -0
  73. package/dist/skills/skillRegistry.js +208 -0
  74. package/dist/types.js +3 -0
  75. package/dist/ui/chatViewProvider.js +3899 -0
  76. package/dist/ui/resultTreeProvider.js +174 -0
  77. package/dist/usage/quotaTracker.js +358 -0
  78. package/dist/utils/async.js +30 -0
  79. package/dist/utils/logger.js +64 -0
  80. package/dist/utils/text.js +364 -0
  81. package/dist/utils/updateChecker.js +140 -0
  82. package/package.json +561 -0
package/README.md ADDED
@@ -0,0 +1,375 @@
1
+ <div align="center">
2
+
3
+ # FlowSeeker
4
+
5
+ **Find the files that matter for your task &mdash; *before* an AI starts reasoning.**
6
+
7
+ [![VS Marketplace](https://img.shields.io/visual-studio-marketplace/v/everestt2806.flowseeker?label=VS%20Marketplace&color=1E63F1)](https://marketplace.visualstudio.com/items?itemName=everestt2806.flowseeker)
8
+ [![Open VSX](https://img.shields.io/open-vsx/v/everestt2806/flowseeker?label=Open%20VSX&color=19D7F0)](https://open-vsx.org/extension/everestt2806/flowseeker)
9
+ [![npm](https://img.shields.io/npm/v/flowseeker?color=CB3837)](https://www.npmjs.com/package/flowseeker)
10
+ [![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](./LICENSE)
11
+
12
+ </div>
13
+
14
+ FlowSeeker retrieves relevant codebase context **before** an AI starts reasoning. Describe the problem, get a ranked list of relevant files with reasons, and send a compact **Solve Packet** to the AI &mdash; not the entire repo.
15
+
16
+ ---
17
+
18
+ ## Choose Your Path
19
+
20
+ > **I want the VS Code extension** &rarr; Install from the Marketplace/Open VSX and use Native VS Code Chat or the FlowSeeker sidebar.
21
+ >
22
+ > **I want MCP only** &rarr; Install the npm package and connect `flowseeker-mcp` to Cursor, Antigravity, Windsurf, Claude Desktop, VS Code/Copilot, or another MCP client.
23
+ >
24
+ > **I want both** &rarr; Install the extension. It includes the sidebar experience and a bundled FlowSeeker MCP server where the host supports MCP providers.
25
+
26
+ ---
27
+
28
+ ## What FlowSeeker Does
29
+
30
+ You have a large project. You need to fix a bug, add a feature, or investigate a problem. You ask an AI agent. The AI reads the wrong files, hallucinates, or runs out of context.
31
+
32
+ FlowSeeker fixes this by doing the retrieval first:
33
+
34
+ - Finds every file that's **likely relevant** &mdash; not just code, but configs, migrations, templates, tests, docs
35
+ - Explains **why** each file was selected &mdash; path match, content match, framework edge, dependency
36
+ - Separates **edit candidates** from **read-only context** and **verification targets**
37
+ - Reports **measured token savings** so you can see how much context the AI avoided loading
38
+ - Reports **context coverage** so token savings are judged alongside whether required flow slots were found
39
+
40
+ ---
41
+
42
+ ## Quick Start
43
+
44
+ ### If you installed the VS Code extension
45
+
46
+ Open VS Code Chat (`Ctrl+Shift+I` or `Cmd+Shift+I`) and type:
47
+
48
+ ```text
49
+ @flowseeker /guide The payment confirmation email is not being sent after checkout
50
+ ```
51
+
52
+ FlowSeeker scans your project and returns a ranked results tree. The AI then explains what to look at, why, and what to change.
53
+
54
+ ```text
55
+ @flowseeker /auto Add SMS notification when payment fails
56
+ ```
57
+
58
+ Same scan, but the AI produces a **reviewable plan only**. No files are changed. After you review and approve, structured edits are generated and applied with one click.
59
+
60
+ ### If you installed the MCP server
61
+
62
+ Run the server and connect your IDE:
63
+
64
+ ```bash
65
+ npx -p flowseeker flowseeker-mcp --workspace /path/to/your/repo
66
+ ```
67
+
68
+ Then configure your IDE to connect to it — see [MCP Server](#mcp-server-cross-ide-integration) below for per-IDE setup.
69
+
70
+ ---
71
+
72
+ ## MCP Server (Cross-IDE Native Chat)
73
+
74
+ FlowSeeker ships a standalone **MCP server** for IDEs and AI clients that support the Model Context Protocol: Cursor, Antigravity, Windsurf, Claude Desktop, VS Code/Copilot, and others.
75
+
76
+ Use this path when you want FlowSeeker inside an IDE's Native Chat without installing the VS Code extension. The IDE's own model reasons over the Solve Packet, so FlowSeeker does not need a separate provider key.
77
+
78
+ ### Install
79
+
80
+ ```bash
81
+ # Run on demand, no global install
82
+ npx -p flowseeker flowseeker-mcp --help
83
+ npx -p flowseeker flowseeker-mcp --version
84
+
85
+ # Or install globally
86
+ npm i -g flowseeker
87
+ flowseeker-mcp --help
88
+ flowseeker-mcp --check-updates
89
+ ```
90
+
91
+ FlowSeeker 0.1.7 and newer also check for extension updates once per day and show a non-modal notice when a newer npm package is available. The MCP CLI never checks for updates during normal stdio server startup; use `flowseeker-mcp --check-updates` when you want an explicit check.
92
+
93
+ ### MCP Tools and Prompts
94
+
95
+ | Tool | Purpose |
96
+ |------|---------|
97
+ | `flowseeker_retrieve` | Return a full Solve Packet with ranked evidence, context coverage, and token savings |
98
+ | `flowseeker_guide` | Return an agent guidance prompt with relevant files, edit candidates, and verification steps |
99
+ | `flowseeker_files` | Return a lightweight top-ranked file list |
100
+
101
+ FlowSeeker also exposes short MCP prompts for clients that surface prompt suggestions:
102
+
103
+ | Prompt | Maps to |
104
+ |--------|---------|
105
+ | `retrieve` | `flowseeker_retrieve` |
106
+ | `guide` | `flowseeker_guide` |
107
+ | `files` | `flowseeker_files` |
108
+
109
+ Autocomplete behavior is controlled by the host IDE. Some clients show tools/prompts after selecting the MCP server; others only insert a server mention such as `@mcp:flowseeker:`. In those clients, use natural language or type the tool name directly.
110
+
111
+ ### Native Chat Examples
112
+
113
+ ```text
114
+ Use FlowSeeker to find relevant files for: fix payment confirmation email after checkout
115
+ ```
116
+
117
+ ```text
118
+ flowseeker_retrieve task: find where MCP server prompts/list is implemented
119
+ ```
120
+
121
+ In Antigravity, current builds may insert this prefix without showing a second-level command menu:
122
+
123
+ ```text
124
+ @mcp:flowseeker: Use FlowSeeker to find relevant files for: fix MCP config loading
125
+ ```
126
+
127
+ That is a host UI limitation. FlowSeeker still works as long as the MCP server is connected.
128
+
129
+ ### IDE Configuration
130
+
131
+ #### Cursor
132
+
133
+ Global config:
134
+
135
+ - macOS: `~/.cursor/mcp.json`
136
+ - Windows: `%USERPROFILE%\.cursor\mcp.json`
137
+
138
+ Project config:
139
+
140
+ - `.cursor/mcp.json` in your project root
141
+
142
+ ```json
143
+ {
144
+ "mcpServers": {
145
+ "flowseeker": {
146
+ "command": "npx",
147
+ "args": ["-p", "flowseeker", "flowseeker-mcp", "--workspace", "."]
148
+ }
149
+ }
150
+ }
151
+ ```
152
+
153
+ #### Antigravity
154
+
155
+ Config file:
156
+
157
+ - macOS: `~/.gemini/antigravity/mcp_config.json`
158
+ - Windows: `%USERPROFILE%\.gemini\antigravity\mcp_config.json`
159
+
160
+ ```json
161
+ {
162
+ "mcpServers": {
163
+ "flowseeker": {
164
+ "command": "npx",
165
+ "args": ["-p", "flowseeker", "flowseeker-mcp", "--workspace", "."]
166
+ }
167
+ }
168
+ }
169
+ ```
170
+
171
+ Testing a local build before npm publish:
172
+
173
+ ```json
174
+ {
175
+ "mcpServers": {
176
+ "flowseeker": {
177
+ "command": "node",
178
+ "args": [
179
+ "D:\\Developing\\FlowSeeker\\dist\\cli\\mcpServer.js",
180
+ "--workspace",
181
+ "D:\\Developing\\FlowSeeker"
182
+ ]
183
+ }
184
+ }
185
+ }
186
+ ```
187
+
188
+ #### Windsurf
189
+
190
+ Config file:
191
+
192
+ - macOS: `~/.codeium/windsurf/mcp_config.json`
193
+ - Windows: `%USERPROFILE%\.codeium\windsurf\mcp_config.json`
194
+
195
+ ```json
196
+ {
197
+ "mcpServers": {
198
+ "flowseeker": {
199
+ "command": "npx",
200
+ "args": ["-p", "flowseeker", "flowseeker-mcp", "--workspace", "."]
201
+ }
202
+ }
203
+ }
204
+ ```
205
+
206
+ #### VS Code / GitHub Copilot
207
+
208
+ VS Code uses `.vscode/mcp.json` and root key `servers`:
209
+
210
+ ```json
211
+ {
212
+ "servers": {
213
+ "flowseeker": {
214
+ "command": "npx",
215
+ "args": ["-p", "flowseeker", "flowseeker-mcp", "--workspace", "."]
216
+ }
217
+ }
218
+ }
219
+ ```
220
+
221
+ #### Claude Desktop
222
+
223
+ Add to `claude_desktop_config.json`:
224
+
225
+ ```json
226
+ {
227
+ "mcpServers": {
228
+ "flowseeker": {
229
+ "command": "npx",
230
+ "args": ["-p", "flowseeker", "flowseeker-mcp", "--workspace", "/path/to/repo"]
231
+ }
232
+ }
233
+ }
234
+ ```
235
+
236
+ ### How It Works
237
+
238
+ 1. Your IDE sends a tool call to the FlowSeeker MCP server.
239
+ 2. FlowSeeker runs the headless pipeline: scan workspace, rank evidence, build Solve Packet.
240
+ 3. The compact result returns to your IDE's model.
241
+ 4. The model answers in your native chat with focused context instead of reading the whole repository.
242
+
243
+ ---
244
+
245
+ ## Token Measurement
246
+
247
+ FlowSeeker measures token reduction from the actual text it prepares, then evaluates retrieval quality and context coverage separately. That keeps the claim grounded: fewer tokens only matter if the expected files and required flow slots still appear.
248
+
249
+ FlowSeeker uses three measurement levels:
250
+
251
+ | Level | When used | What it means |
252
+ |-------|-----------|---------------|
253
+ | `local_bpe` / `cl100k_base` | Default headless, sidebar, and report path | Workspace text and Solve Packet text are counted with the same BPE tokenizer |
254
+ | VS Code model `countTokens()` | Native VS Code Chat when the selected model exposes token counting | The exact prompt sent to the selected chat model is counted by that model provider |
255
+ | `heuristic` / `chars_per_4` | Fallback only if local tokenization fails | Conservative compatibility fallback, marked as heuristic |
256
+
257
+ The baseline is not a guess from file count. FlowSeeker tokenizes eligible workspace text during indexing, stores per-file token counts, and compares that against the final Solve Packet text sent to the AI workflow.
258
+
259
+ FlowSeeker shows these metrics directly after each retrieval:
260
+
261
+ | Metric | Meaning |
262
+ |--------|---------|
263
+ | Solve Packet tokens | Tokens in the FlowSeeker packet prepared for the AI |
264
+ | Workspace tokens | Tokens in eligible workspace text files, counted during indexing |
265
+ | Reduction | Context reduction from workspace text to Solve Packet |
266
+ | Context coverage | Required slots found for the task shape, such as entry, handler, data, validation, permissions, side effects, or tests |
267
+
268
+ ---
269
+
270
+ ## How to Use (VS Code Extension)
271
+
272
+ ### Chat Commands
273
+
274
+ | Command | What it does |
275
+ |---------|--------------|
276
+ | `@flowseeker /guide <task>` | Retrieve context, get explanation and guidance |
277
+ | `@flowseeker /auto <task>` | Retrieve context, get a reviewable plan before any edits |
278
+ | `@flowseeker /apply <planId>` | After approving a plan, generate structured edits |
279
+
280
+ ### Agent Workflow
281
+
282
+ FlowSeeker intentionally separates retrieval, planning, editing, and verification:
283
+
284
+ 1. Retrieve a Solve Packet from the workspace.
285
+ 2. Ask the AI for a reviewable plan in the user's language.
286
+ 3. Disable approval if the AI only asks for more context instead of returning a real plan.
287
+ 4. After approval, ask for structured JSON edits only.
288
+ 5. Show a diff before applying edits, unless auto-apply is explicitly enabled.
289
+ 6. Run focused verification commands when requested or allowed by your approval policy.
290
+
291
+ If the AI says the packet is incomplete, FlowSeeker reads a small bounded set of candidate files and retries the plan or edit request.
292
+
293
+ ### Command Palette
294
+
295
+ | Command | Action |
296
+ |---------|--------|
297
+ | `FlowSeeker: Find Relevant Context` | Run retrieval from the command palette |
298
+ | `FlowSeeker: Copy Context Pack` | Copy evidence as markdown for external AI tools |
299
+ | `FlowSeeker: Check Host Compatibility` | Inspect Native Chat, Language Model, and MCP support in the current editor |
300
+
301
+ ### If You Don't Have Native Chat
302
+
303
+ VS Code-compatible editors vary in how much of the VS Code Chat and Language Model APIs they expose. If `@flowseeker` is unavailable, use the **FlowSeeker sidebar** when the extension host supports it, or use the **MCP server** above to integrate FlowSeeker with your IDE's native chat.
304
+
305
+ ---
306
+
307
+ ## Configuration
308
+
309
+ Add `.flowseeker/config.json` to your project root:
310
+
311
+ ```json
312
+ {
313
+ "project": {
314
+ "include": ["src", "app", "lib", "tests"],
315
+ "exclude": ["node_modules", "vendor", "dist", "build"]
316
+ },
317
+ "synonyms": {
318
+ "mail": ["email", "smtp", "notification"],
319
+ "payment": ["billing", "invoice", "checkout", "transaction"]
320
+ }
321
+ }
322
+ ```
323
+
324
+ `include` / `exclude` control which folders are indexed; `synonyms` expand task keywords during retrieval.
325
+
326
+ ---
327
+
328
+ ## Install
329
+
330
+ ### VS Code Extension
331
+
332
+ Search **FlowSeeker** in VS Code Extensions (`Ctrl+Shift+X`), or:
333
+
334
+ ```
335
+ ext install everestt2806.flowseeker
336
+ ```
337
+
338
+ FlowSeeker is also available on Open VSX for editors such as VSCodium and Eclipse Theia:
339
+
340
+ ```
341
+ open-vsx.org/extension/everestt2806/flowseeker
342
+ ```
343
+
344
+ ### MCP Server (npm)
345
+
346
+ ```bash
347
+ # Run on demand (no install needed)
348
+ npx -p flowseeker flowseeker-mcp --help
349
+
350
+ # Or install globally
351
+ npm i -g flowseeker
352
+ ```
353
+
354
+ ---
355
+
356
+ ## Requirements
357
+
358
+ - **For the VS Code extension:** VS Code 1.90 or later, plus a VS Code language model, a configured AI provider, or an external AI chat tool.
359
+ - **For the MCP server:** Node.js 18 or later and any MCP-compliant client (Cursor, Antigravity, Windsurf, Claude Desktop, VS Code/Copilot, etc.).
360
+
361
+ ---
362
+
363
+ ## Supported Languages & Frameworks
364
+
365
+ | Level | What | Coverage |
366
+ |-------|------|----------|
367
+ | **Universal** | Path/content/chunk search | Every text file |
368
+ | **Structured** | Symbol, call, string, comment extraction | TypeScript, JavaScript, Python, PHP, Java, Go, C#, Ruby, Rust, Kotlin |
369
+ | **Framework-aware** | Route -> controller -> service -> model -> test edges | Laravel, NestJS, Express |
370
+
371
+ ---
372
+
373
+ ## License
374
+
375
+ MIT