@syke1/mcp-server 1.4.19 → 1.4.21
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 +1 -1
- package/dist/license/validator.js +22 -1
- package/dist/web/public/app.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -704,7 +704,7 @@ async function main() {
|
|
|
704
704
|
const { app: webApp, setFileCache: setWebFileCache } = (0, server_1.createWebServer)(() => (0, graph_1.getGraph)(currentProjectRoot, currentPackageName), fileCache, switchProject, () => currentProjectRoot, () => currentPackageName, () => licenseStatus, () => !!(0, provider_1.getAIProvider)(), async (key) => {
|
|
705
705
|
// Stop existing heartbeat/session
|
|
706
706
|
await (0, validator_1.stopAndDeactivate)();
|
|
707
|
-
if (key && key.startsWith("SYKE-")) {
|
|
707
|
+
if (key && (key.startsWith("SYKE-") || key.startsWith("FOUNDING-"))) {
|
|
708
708
|
(0, config_1.setConfig)("licenseKey", key);
|
|
709
709
|
(0, validator_1.clearLicenseCache)(); // clear stale cache from previous key
|
|
710
710
|
try {
|
|
@@ -84,7 +84,7 @@ function getDeviceName() {
|
|
|
84
84
|
*/
|
|
85
85
|
function getLicenseKey() {
|
|
86
86
|
const key = (0, config_1.getConfig)("licenseKey", "SYKE_LICENSE_KEY");
|
|
87
|
-
if (key && key.startsWith("SYKE-"))
|
|
87
|
+
if (key && (key.startsWith("SYKE-") || key.startsWith("FOUNDING-")))
|
|
88
88
|
return key;
|
|
89
89
|
return null;
|
|
90
90
|
}
|
|
@@ -259,6 +259,27 @@ async function checkLicense() {
|
|
|
259
259
|
}
|
|
260
260
|
// Try online validation (with device binding)
|
|
261
261
|
const result = await validateOnline(key);
|
|
262
|
+
// Handle founding code auto-redemption: server returns real SYKE- key
|
|
263
|
+
if (result.foundingRedeemed && result.licenseKey) {
|
|
264
|
+
const realKey = result.licenseKey;
|
|
265
|
+
console.error(`[syke] Founding code redeemed → ${realKey}`);
|
|
266
|
+
(0, config_1.setConfig)("licenseKey", realKey);
|
|
267
|
+
clearLicenseCache();
|
|
268
|
+
writeCache({
|
|
269
|
+
valid: true,
|
|
270
|
+
plan: result.plan,
|
|
271
|
+
email: result.email,
|
|
272
|
+
expiresAt: result.expiresAt,
|
|
273
|
+
cachedAt: now,
|
|
274
|
+
});
|
|
275
|
+
startHeartbeat(realKey, getDeviceFingerprint());
|
|
276
|
+
return {
|
|
277
|
+
plan: "pro",
|
|
278
|
+
email: result.email,
|
|
279
|
+
expiresAt: result.expiresAt,
|
|
280
|
+
source: "online",
|
|
281
|
+
};
|
|
282
|
+
}
|
|
262
283
|
if (!result.valid) {
|
|
263
284
|
const reason = result.error || "invalid key or expired";
|
|
264
285
|
console.error(`[syke] License validation failed: ${reason}`);
|
package/dist/web/public/app.js
CHANGED
|
@@ -3869,9 +3869,9 @@ function setupLicenseModal() {
|
|
|
3869
3869
|
|
|
3870
3870
|
activateBtn.addEventListener("click", async () => {
|
|
3871
3871
|
const key = input.value.trim();
|
|
3872
|
-
if (!key || !key.startsWith("SYKE-")) {
|
|
3872
|
+
if (!key || !(key.startsWith("SYKE-") || key.startsWith("FOUNDING-"))) {
|
|
3873
3873
|
statusEl.className = "error";
|
|
3874
|
-
statusEl.textContent = "Key must start with SYKE-";
|
|
3874
|
+
statusEl.textContent = "Key must start with SYKE- or FOUNDING-";
|
|
3875
3875
|
return;
|
|
3876
3876
|
}
|
|
3877
3877
|
statusEl.className = "loading";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syke1/mcp-server",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.21",
|
|
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",
|