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.
- package/CHANGELOG.md +111 -0
- package/COMPATIBILITY.md +281 -0
- package/LICENSE +21 -0
- package/README.md +375 -0
- package/dist/adapters/frameworkEdges.js +586 -0
- package/dist/agent/approvalPolicy.js +81 -0
- package/dist/agent/commandRunner.js +166 -0
- package/dist/agent/flowCommandRunner.js +124 -0
- package/dist/agent/mcpToolRunner.js +167 -0
- package/dist/auth/githubAuth.js +71 -0
- package/dist/auth/modelList.js +127 -0
- package/dist/auth/oauthHandler.js +377 -0
- package/dist/chat/nativeChatParticipant.js +616 -0
- package/dist/cli/mcpServer.js +383 -0
- package/dist/cli/runEvaluation.js +789 -0
- package/dist/cli/runReplay.js +481 -0
- package/dist/commands/checkHostCompatibility.js +149 -0
- package/dist/commands/copyAgentPrompt.js +52 -0
- package/dist/commands/copyContext.js +54 -0
- package/dist/commands/explainSelectionRelevance.js +57 -0
- package/dist/commands/findRelevantContext.js +127 -0
- package/dist/commands/openEvidence.js +49 -0
- package/dist/commands/openMcpConfig.js +81 -0
- package/dist/commands/openRelatedTests.js +54 -0
- package/dist/commands/rebuildIndex.js +45 -0
- package/dist/commands/runEvaluationSuite.js +323 -0
- package/dist/commands/runReplaySuite.js +228 -0
- package/dist/config/defaultConfig.js +72 -0
- package/dist/config/loadConfig.js +84 -0
- package/dist/config/loadConfigFromPath.js +60 -0
- package/dist/extension.js +513 -0
- package/dist/gateway/agentPrompts.js +176 -0
- package/dist/gateway/aiGateway.js +1255 -0
- package/dist/gateway/aiProviders.js +901 -0
- package/dist/gateway/contextExpansion.js +331 -0
- package/dist/gateway/editProposalStore.js +238 -0
- package/dist/gateway/planProposalStore.js +28 -0
- package/dist/index/cacheStore.js +51 -0
- package/dist/index/chunker.js +45 -0
- package/dist/index/dependencyExtractor.js +107 -0
- package/dist/index/fileDiscovery.js +177 -0
- package/dist/index/structuredExtractor.js +256 -0
- package/dist/index/workspaceIndex.js +518 -0
- package/dist/mcp/mcpConfig.js +154 -0
- package/dist/mcp/mcpProvider.js +109 -0
- package/dist/mcp/mcpTools.js +215 -0
- package/dist/pipeline/agentPrompt.js +79 -0
- package/dist/pipeline/agentPromptHeadless.js +85 -0
- package/dist/pipeline/contextBlueprint.js +346 -0
- package/dist/pipeline/contextPack.js +80 -0
- package/dist/pipeline/diffPreview.js +79 -0
- package/dist/pipeline/evaluationMetrics.js +154 -0
- package/dist/pipeline/evidenceGraph.js +389 -0
- package/dist/pipeline/feedback.js +215 -0
- package/dist/pipeline/fileGroups.js +84 -0
- package/dist/pipeline/fileScanner.js +866 -0
- package/dist/pipeline/nodeScan.js +219 -0
- package/dist/pipeline/ranker.js +563 -0
- package/dist/pipeline/responseLanguage.js +39 -0
- package/dist/pipeline/retrievalPlan.js +163 -0
- package/dist/pipeline/runHeadless.js +54 -0
- package/dist/pipeline/runPipeline.js +114 -0
- package/dist/pipeline/solvePacket.js +382 -0
- package/dist/pipeline/subsystem.js +257 -0
- package/dist/pipeline/taskUnderstanding.js +453 -0
- package/dist/pipeline/tokenSavings.js +146 -0
- package/dist/pipeline/universalScan.js +216 -0
- package/dist/pipeline/verifyAfterApply.js +233 -0
- package/dist/runtime/capabilities.js +71 -0
- package/dist/runtime/hostDetect.js +98 -0
- package/dist/runtime/hostTier.js +68 -0
- package/dist/runtime/statusBar.js +80 -0
- package/dist/skills/skillRegistry.js +208 -0
- package/dist/types.js +3 -0
- package/dist/ui/chatViewProvider.js +3899 -0
- package/dist/ui/resultTreeProvider.js +174 -0
- package/dist/usage/quotaTracker.js +358 -0
- package/dist/utils/async.js +30 -0
- package/dist/utils/logger.js +64 -0
- package/dist/utils/text.js +364 -0
- package/dist/utils/updateChecker.js +140 -0
- package/package.json +561 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.registerFlowSeekerStatusBar = registerFlowSeekerStatusBar;
|
|
37
|
+
exports.updateStatusBar = updateStatusBar;
|
|
38
|
+
const vscode = __importStar(require("vscode"));
|
|
39
|
+
const hostTier_1 = require("./hostTier");
|
|
40
|
+
const hostDetect_1 = require("./hostDetect");
|
|
41
|
+
let statusBarItem;
|
|
42
|
+
function registerFlowSeekerStatusBar(context) {
|
|
43
|
+
statusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, 99);
|
|
44
|
+
statusBarItem.command = "flowseeker.checkHostCompatibility";
|
|
45
|
+
statusBarItem.tooltip = "Click to check FlowSeeker host compatibility and capabilities";
|
|
46
|
+
updateStatusBar();
|
|
47
|
+
statusBarItem.show();
|
|
48
|
+
const disposable = vscode.Disposable.from(statusBarItem);
|
|
49
|
+
context.subscriptions.push(disposable);
|
|
50
|
+
return disposable;
|
|
51
|
+
}
|
|
52
|
+
function updateStatusBar() {
|
|
53
|
+
if (!statusBarItem)
|
|
54
|
+
return;
|
|
55
|
+
(0, hostTier_1.clearTierCache)();
|
|
56
|
+
const tier = (0, hostTier_1.getHostTier)();
|
|
57
|
+
const host = (0, hostDetect_1.detectHost)();
|
|
58
|
+
switch (tier.tier) {
|
|
59
|
+
case "native-full":
|
|
60
|
+
statusBarItem.text = "$(check) FlowSeeker";
|
|
61
|
+
statusBarItem.backgroundColor = undefined;
|
|
62
|
+
break;
|
|
63
|
+
case "native-unverified":
|
|
64
|
+
statusBarItem.text = "$(warning) FlowSeeker";
|
|
65
|
+
statusBarItem.backgroundColor = undefined;
|
|
66
|
+
break;
|
|
67
|
+
case "sidebar-primary":
|
|
68
|
+
statusBarItem.text = "$(info) FlowSeeker: Sidebar";
|
|
69
|
+
statusBarItem.backgroundColor = undefined;
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
statusBarItem.tooltip = [
|
|
73
|
+
`FlowSeeker — ${(0, hostTier_1.tierLabel)(tier.tier)} mode`,
|
|
74
|
+
`Host: ${host.appName} ${host.version}`,
|
|
75
|
+
tier.reason,
|
|
76
|
+
"",
|
|
77
|
+
"Click for full compatibility report"
|
|
78
|
+
].join("\n");
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=statusBar.js.map
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.SkillRegistry = void 0;
|
|
37
|
+
const vscode = __importStar(require("vscode"));
|
|
38
|
+
const builtinSkills = [
|
|
39
|
+
{
|
|
40
|
+
name: "review",
|
|
41
|
+
description: "Review the current code changes for bugs and improvements",
|
|
42
|
+
prompt: `You are a code reviewer. Review the current code changes for:
|
|
43
|
+
1. Correctness bugs (logic errors, edge cases, null handling)
|
|
44
|
+
2. Security issues (injection, XSS, unsafe deserialization)
|
|
45
|
+
3. Performance concerns (N+1 queries, unnecessary allocations)
|
|
46
|
+
4. Code clarity (confusing names, missing error handling)
|
|
47
|
+
|
|
48
|
+
Be concise. For each issue found, state the file, line range, severity, and a one-line fix. Do not suggest adding comments or documentation. Only report real problems.`,
|
|
49
|
+
mode: "guide",
|
|
50
|
+
source: "builtin"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "test",
|
|
54
|
+
description: "Generate tests for the current selection or changed files",
|
|
55
|
+
prompt: `Generate thorough tests for the code in context. Follow these rules:
|
|
56
|
+
1. Cover happy path, edge cases, error paths
|
|
57
|
+
2. Use the project's existing test framework (detect from package.json or config files)
|
|
58
|
+
3. Keep tests focused - one behavior per test
|
|
59
|
+
4. Mock external dependencies but test real logic
|
|
60
|
+
5. Include setup/teardown where needed
|
|
61
|
+
|
|
62
|
+
Output only the test code with a brief explanation of coverage.`,
|
|
63
|
+
mode: "guide",
|
|
64
|
+
source: "builtin"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "explain",
|
|
68
|
+
description: "Explain the selected code in detail",
|
|
69
|
+
prompt: `Explain the selected code like you're teaching a senior engineer who's new to this codebase. Cover:
|
|
70
|
+
1. What this code does at a high level
|
|
71
|
+
2. The algorithm or pattern being used
|
|
72
|
+
3. Key dependencies and why they're needed
|
|
73
|
+
4. Potential edge cases or gotchas
|
|
74
|
+
5. How it fits into the larger system
|
|
75
|
+
|
|
76
|
+
Be thorough but avoid restating obvious syntax. Focus on the WHY, not the WHAT.`,
|
|
77
|
+
mode: "guide",
|
|
78
|
+
source: "builtin"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "fix",
|
|
82
|
+
description: "Fix bugs or issues in the selected code",
|
|
83
|
+
prompt: `Analyze the code for bugs, logic errors, or incorrect behavior. For each issue found:
|
|
84
|
+
1. Identify the root cause
|
|
85
|
+
2. Apply the minimal fix needed
|
|
86
|
+
3. Explain why the fix is correct
|
|
87
|
+
|
|
88
|
+
Do NOT refactor working code, add features, or change style. Fix ONLY actual bugs. If there are no bugs, say so clearly.`,
|
|
89
|
+
mode: "auto",
|
|
90
|
+
source: "builtin"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "refactor",
|
|
94
|
+
description: "Refactor the selected code for clarity and simplicity",
|
|
95
|
+
prompt: `Refactor the selected code following these principles:
|
|
96
|
+
1. Reduce duplication - extract repeated patterns
|
|
97
|
+
2. Simplify complex conditionals - use early returns, guard clauses
|
|
98
|
+
3. Improve names - make them reveal intent
|
|
99
|
+
4. Flatten deep nesting - extract functions where it clarifies
|
|
100
|
+
5. Remove dead code and unnecessary abstractions
|
|
101
|
+
|
|
102
|
+
Preserve all existing behavior. Do not change the public API. Keep changes minimal and focused.`,
|
|
103
|
+
mode: "auto",
|
|
104
|
+
source: "builtin"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: "optimize",
|
|
108
|
+
description: "Optimize the selected code for performance",
|
|
109
|
+
prompt: `Analyze the selected code for performance issues and optimize. Focus on:
|
|
110
|
+
1. Algorithmic complexity (O(n^2) to O(n log n) improvements)
|
|
111
|
+
2. Unnecessary allocations or copies
|
|
112
|
+
3. Blocking I/O that could be async
|
|
113
|
+
4. Repeated work that could be cached
|
|
114
|
+
5. Excessive DOM / rendering work (for UI code)
|
|
115
|
+
|
|
116
|
+
Only optimize code that is actually on a hot path. Do not micro-optimize. Explain the expected improvement for each change.`,
|
|
117
|
+
mode: "auto",
|
|
118
|
+
source: "builtin"
|
|
119
|
+
}
|
|
120
|
+
];
|
|
121
|
+
class SkillRegistry {
|
|
122
|
+
constructor(context) {
|
|
123
|
+
this.context = context;
|
|
124
|
+
this.workspaceSkills = [];
|
|
125
|
+
}
|
|
126
|
+
getAllSkills() {
|
|
127
|
+
return [...builtinSkills, ...this.workspaceSkills];
|
|
128
|
+
}
|
|
129
|
+
getSkill(name) {
|
|
130
|
+
return this.getAllSkills().find((skill) => skill.name.toLowerCase() === name.toLowerCase());
|
|
131
|
+
}
|
|
132
|
+
async loadWorkspaceSkills() {
|
|
133
|
+
this.workspaceSkills = [];
|
|
134
|
+
const folders = vscode.workspace.workspaceFolders;
|
|
135
|
+
if (!folders || folders.length === 0) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
for (const folder of folders) {
|
|
139
|
+
const skillsDir = vscode.Uri.joinPath(folder.uri, ".vscode", "flowseeker", "skills");
|
|
140
|
+
try {
|
|
141
|
+
const entries = await vscode.workspace.fs.readDirectory(skillsDir);
|
|
142
|
+
for (const [name, type] of entries) {
|
|
143
|
+
if (type === vscode.FileType.File && name.endsWith(".md")) {
|
|
144
|
+
const skill = await this.parseSkillFile(vscode.Uri.joinPath(skillsDir, name));
|
|
145
|
+
if (skill) {
|
|
146
|
+
this.workspaceSkills.push(skill);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
catch {
|
|
152
|
+
// Directory doesn't exist - that's fine
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
startWatching() {
|
|
157
|
+
const pattern = new vscode.RelativePattern(vscode.workspace.workspaceFolders?.[0] ?? vscode.Uri.file(""), ".vscode/flowseeker/skills/*.md");
|
|
158
|
+
this.watcher = vscode.workspace.createFileSystemWatcher(pattern);
|
|
159
|
+
const onChange = async () => {
|
|
160
|
+
await this.loadWorkspaceSkills();
|
|
161
|
+
};
|
|
162
|
+
this.watcher.onDidCreate(onChange);
|
|
163
|
+
this.watcher.onDidChange(onChange);
|
|
164
|
+
this.watcher.onDidDelete(onChange);
|
|
165
|
+
return this.watcher;
|
|
166
|
+
}
|
|
167
|
+
async parseSkillFile(uri) {
|
|
168
|
+
try {
|
|
169
|
+
const raw = await vscode.workspace.fs.readFile(uri);
|
|
170
|
+
const content = new TextDecoder().decode(raw);
|
|
171
|
+
const { frontmatter, body } = this.parseFrontmatter(content);
|
|
172
|
+
const name = frontmatter.name ?? uri.path.split("/").pop()?.replace(/\.md$/, "") ?? "unnamed";
|
|
173
|
+
const description = frontmatter.description ?? `Custom skill: ${name}`;
|
|
174
|
+
const mode = frontmatter.mode === "auto" ? "auto" : "guide";
|
|
175
|
+
return {
|
|
176
|
+
name,
|
|
177
|
+
description,
|
|
178
|
+
prompt: body.trim(),
|
|
179
|
+
mode,
|
|
180
|
+
source: "workspace",
|
|
181
|
+
filePath: uri.fsPath
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
catch {
|
|
185
|
+
return undefined;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
parseFrontmatter(content) {
|
|
189
|
+
const match = content.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);
|
|
190
|
+
if (!match) {
|
|
191
|
+
return { frontmatter: {}, body: content };
|
|
192
|
+
}
|
|
193
|
+
const lines = match[1].split("\n");
|
|
194
|
+
const frontmatter = {};
|
|
195
|
+
for (const line of lines) {
|
|
196
|
+
const kv = line.match(/^(\w+)\s*:\s*(.+)\s*$/);
|
|
197
|
+
if (kv) {
|
|
198
|
+
frontmatter[kv[1]] = kv[2].replace(/^["']|["']$/g, "");
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return { frontmatter, body: match[2] };
|
|
202
|
+
}
|
|
203
|
+
dispose() {
|
|
204
|
+
this.watcher?.dispose();
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
exports.SkillRegistry = SkillRegistry;
|
|
208
|
+
//# sourceMappingURL=skillRegistry.js.map
|
package/dist/types.js
ADDED