@syke1/mcp-server 1.7.0 → 1.7.1
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/dist/index.js +14 -26
- package/dist/remote/proxy.d.ts +1 -5
- package/dist/remote/proxy.js +0 -22
- package/dist/remote/types.d.ts +0 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -133,7 +133,7 @@ async function main() {
|
|
|
133
133
|
};
|
|
134
134
|
process.on("SIGINT", shutdown);
|
|
135
135
|
process.on("SIGTERM", shutdown);
|
|
136
|
-
const server = new index_js_1.Server({ name: "syke", version: "1.7.
|
|
136
|
+
const server = new index_js_1.Server({ name: "syke", version: "1.7.1" }, { capabilities: { tools: {} } });
|
|
137
137
|
// List tools
|
|
138
138
|
server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => ({
|
|
139
139
|
tools: [
|
|
@@ -514,34 +514,22 @@ async function main() {
|
|
|
514
514
|
if (!isFileInFreeSet(resolved, graph)) {
|
|
515
515
|
return { content: [{ type: "text", text: PRO_UPGRADE_MSG }] };
|
|
516
516
|
}
|
|
517
|
-
// BYOK
|
|
518
|
-
if (hasAIKey) {
|
|
519
|
-
const { analyzeImpact: localAnalyzeImpact } = await Promise.resolve().then(() => __importStar(require("./tools/analyze-impact")));
|
|
520
|
-
const impactResult = await localAnalyzeImpact(resolved, graph);
|
|
521
|
-
const aiResult = await (0, analyzer_1.analyzeWithAI)(resolved, impactResult, graph);
|
|
522
|
-
let resultText = aiResult;
|
|
523
|
-
if (!isPro() && graph.files.size > FREE_MAX_FILES) {
|
|
524
|
-
resultText += `\n\n---\nFree tier: analyzing ${FREE_MAX_FILES}/${graph.files.size} files. Some dependencies may be missing. Upgrade to Pro for full analysis: https://syke.cloud/dashboard/`;
|
|
525
|
-
}
|
|
517
|
+
// BYOK only: user must have their own AI key configured
|
|
518
|
+
if (!hasAIKey) {
|
|
526
519
|
return {
|
|
527
|
-
content: [{ type: "text", text:
|
|
520
|
+
content: [{ type: "text", text: `ai_analyze requires an AI API key.\n\nSet one of: GEMINI_KEY, OPENAI_KEY, or ANTHROPIC_KEY in your environment.\nSee: https://syke.cloud/docs/ai-analyze` }],
|
|
528
521
|
};
|
|
529
522
|
}
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
content: [{ type: "text", text: appendDashboardFooter(result.analysis) }],
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
catch (err) {
|
|
540
|
-
return {
|
|
541
|
-
content: [{ type: "text", text: `ai_analyze failed: ${err.message || err}` }],
|
|
542
|
-
isError: true,
|
|
543
|
-
};
|
|
523
|
+
const { analyzeImpact: localAnalyzeImpact } = await Promise.resolve().then(() => __importStar(require("./tools/analyze-impact")));
|
|
524
|
+
const impactResult = await localAnalyzeImpact(resolved, graph);
|
|
525
|
+
const aiResult = await (0, analyzer_1.analyzeWithAI)(resolved, impactResult, graph);
|
|
526
|
+
let resultText = aiResult;
|
|
527
|
+
if (!isPro() && graph.files.size > FREE_MAX_FILES) {
|
|
528
|
+
resultText += `\n\n---\nFree tier: analyzing ${FREE_MAX_FILES}/${graph.files.size} files. Some dependencies may be missing. Upgrade to Pro for full analysis: https://syke.cloud/dashboard/`;
|
|
544
529
|
}
|
|
530
|
+
return {
|
|
531
|
+
content: [{ type: "text", text: appendDashboardFooter(resultText) }],
|
|
532
|
+
};
|
|
545
533
|
}
|
|
546
534
|
case "check_warnings": {
|
|
547
535
|
// Pro-only feature (real-time monitoring)
|
|
@@ -774,7 +762,7 @@ main().catch((err) => {
|
|
|
774
762
|
* See: https://smithery.ai/docs/deploy#sandbox-server
|
|
775
763
|
*/
|
|
776
764
|
function createSandboxServer() {
|
|
777
|
-
const sandboxServer = new index_js_1.Server({ name: "syke", version: "1.7.
|
|
765
|
+
const sandboxServer = new index_js_1.Server({ name: "syke", version: "1.7.1" }, { capabilities: { tools: {} } });
|
|
778
766
|
sandboxServer.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => ({
|
|
779
767
|
tools: [
|
|
780
768
|
{
|
package/dist/remote/proxy.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* same output format, just executed on the server.
|
|
7
7
|
*/
|
|
8
8
|
import { DependencyGraph } from "../graph";
|
|
9
|
-
import { GraphBundle, RemoteAnalyzeImpactResponse, RemoteGetHubFilesResponse
|
|
9
|
+
import { GraphBundle, RemoteAnalyzeImpactResponse, RemoteGetHubFilesResponse } from "./types";
|
|
10
10
|
/**
|
|
11
11
|
* Serialize a DependencyGraph into a GraphBundle for transmission.
|
|
12
12
|
* Converts absolute paths to relative paths (relative to sourceDir)
|
|
@@ -23,10 +23,6 @@ export declare function remoteAnalyzeImpact(graph: DependencyGraph, resolvedFile
|
|
|
23
23
|
* Remote get_hub_files: sends graph to server for PageRank analysis.
|
|
24
24
|
*/
|
|
25
25
|
export declare function remoteGetHubFiles(graph: DependencyGraph, topN?: number): Promise<RemoteGetHubFilesResponse>;
|
|
26
|
-
/**
|
|
27
|
-
* Remote ai_analyze: sends graph + file contents to server for AI analysis.
|
|
28
|
-
*/
|
|
29
|
-
export declare function remoteAIAnalyze(graph: DependencyGraph, resolvedFilePath: string, fileContents: string): Promise<RemoteAIAnalyzeResponse>;
|
|
30
26
|
/**
|
|
31
27
|
* Remote license validation only (for refresh_graph, check_warnings).
|
|
32
28
|
* Returns true if the license is valid Pro.
|
package/dist/remote/proxy.js
CHANGED
|
@@ -43,7 +43,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
43
43
|
exports.serializeGraph = serializeGraph;
|
|
44
44
|
exports.remoteAnalyzeImpact = remoteAnalyzeImpact;
|
|
45
45
|
exports.remoteGetHubFiles = remoteGetHubFiles;
|
|
46
|
-
exports.remoteAIAnalyze = remoteAIAnalyze;
|
|
47
46
|
exports.remoteValidateLicense = remoteValidateLicense;
|
|
48
47
|
const https = __importStar(require("https"));
|
|
49
48
|
const path = __importStar(require("path"));
|
|
@@ -53,7 +52,6 @@ const BASE_URL = "https://us-central1-syke-cloud.cloudfunctions.net";
|
|
|
53
52
|
const ENDPOINTS = {
|
|
54
53
|
analyzeImpact: `${BASE_URL}/proAnalyzeImpact`,
|
|
55
54
|
getHubFiles: `${BASE_URL}/proGetHubFiles`,
|
|
56
|
-
aiAnalyze: `${BASE_URL}/proAIAnalyze`,
|
|
57
55
|
};
|
|
58
56
|
// ── Graph Serialization ──
|
|
59
57
|
/**
|
|
@@ -173,26 +171,6 @@ async function remoteGetHubFiles(graph, topN = 10) {
|
|
|
173
171
|
});
|
|
174
172
|
return result;
|
|
175
173
|
}
|
|
176
|
-
/**
|
|
177
|
-
* Remote ai_analyze: sends graph + file contents to server for AI analysis.
|
|
178
|
-
*/
|
|
179
|
-
async function remoteAIAnalyze(graph, resolvedFilePath, fileContents) {
|
|
180
|
-
const licenseKey = getLicenseKey();
|
|
181
|
-
if (!licenseKey) {
|
|
182
|
-
throw new Error("No license key configured");
|
|
183
|
-
}
|
|
184
|
-
const graphBundle = serializeGraph(graph);
|
|
185
|
-
const targetFile = path.relative(graph.sourceDir, resolvedFilePath).replace(/\\/g, "/");
|
|
186
|
-
const result = await postJSON(ENDPOINTS.aiAnalyze, {
|
|
187
|
-
licenseKey,
|
|
188
|
-
deviceId: getDeviceId(),
|
|
189
|
-
graphBundle,
|
|
190
|
-
targetFile,
|
|
191
|
-
fileContents,
|
|
192
|
-
languages: graph.languages,
|
|
193
|
-
});
|
|
194
|
-
return result;
|
|
195
|
-
}
|
|
196
174
|
/**
|
|
197
175
|
* Remote license validation only (for refresh_graph, check_warnings).
|
|
198
176
|
* Returns true if the license is valid Pro.
|
package/dist/remote/types.d.ts
CHANGED
|
@@ -64,17 +64,6 @@ export interface RemoteGetHubFilesResponse {
|
|
|
64
64
|
}>;
|
|
65
65
|
totalFiles: number;
|
|
66
66
|
}
|
|
67
|
-
export interface RemoteAIAnalyzeRequest {
|
|
68
|
-
licenseKey: string;
|
|
69
|
-
deviceId: string;
|
|
70
|
-
graphBundle: GraphBundle;
|
|
71
|
-
targetFile: string;
|
|
72
|
-
fileContents: string;
|
|
73
|
-
languages: string[];
|
|
74
|
-
}
|
|
75
|
-
export interface RemoteAIAnalyzeResponse {
|
|
76
|
-
analysis: string;
|
|
77
|
-
}
|
|
78
67
|
export interface RemoteError {
|
|
79
68
|
error: string;
|
|
80
69
|
code?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syke1/mcp-server",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"mcpName": "io.github.khalomsky/syke",
|
|
5
5
|
"description": "AI code impact analysis MCP server — dependency graphs, cascade detection, and a mandatory build gate for AI coding agents",
|
|
6
6
|
"main": "dist/index.js",
|