@memly/mcp-server 0.2.8 → 0.2.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.
- package/dist/index.js +26 -18
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20252,7 +20252,7 @@ import { join, resolve } from "node:path";
|
|
|
20252
20252
|
import { homedir, platform } from "node:os";
|
|
20253
20253
|
import * as readline from "node:readline";
|
|
20254
20254
|
var MEMLY_INSTRUCTION_BLOCK = `
|
|
20255
|
-
## Memly
|
|
20255
|
+
## Memly - Persistent Memory (Auto-Enabled)
|
|
20256
20256
|
|
|
20257
20257
|
You have access to the Memly MCP server (\`memly\`).
|
|
20258
20258
|
|
|
@@ -20268,7 +20268,7 @@ You have access to the Memly MCP server (\`memly\`).
|
|
|
20268
20268
|
- User shares important project context, preferences, or constraints
|
|
20269
20269
|
- User explicitly says "remember this"
|
|
20270
20270
|
|
|
20271
|
-
3. **Never** ask if you should remember something
|
|
20271
|
+
3. **Never** ask if you should remember something - just do it silently.
|
|
20272
20272
|
`.trim();
|
|
20273
20273
|
async function promptApiKey() {
|
|
20274
20274
|
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
@@ -20633,9 +20633,9 @@ async function runInit() {
|
|
|
20633
20633
|
process.exit(1);
|
|
20634
20634
|
}
|
|
20635
20635
|
console.log(`
|
|
20636
|
-
|
|
20637
|
-
console.log(" Memly Init
|
|
20638
|
-
console.log(
|
|
20636
|
+
--------------------------------`);
|
|
20637
|
+
console.log(" Memly Init - Auto-Memory Setup");
|
|
20638
|
+
console.log(`--------------------------------
|
|
20639
20639
|
`);
|
|
20640
20640
|
let apiKey = process.env.MEMLY_API_KEY;
|
|
20641
20641
|
let keyWasPrompted = false;
|
|
@@ -20657,17 +20657,17 @@ No API key provided. Aborting.
|
|
|
20657
20657
|
process.stdout.write("Validating API key... ");
|
|
20658
20658
|
const valid = await validateApiKey(apiKey);
|
|
20659
20659
|
if (!valid) {
|
|
20660
|
-
console.
|
|
20660
|
+
console.log(`INVALID
|
|
20661
20661
|
`);
|
|
20662
20662
|
console.error(`Check your API key at: https://memly.site/dashboard
|
|
20663
20663
|
`);
|
|
20664
20664
|
process.exit(1);
|
|
20665
20665
|
}
|
|
20666
|
-
console.log(
|
|
20666
|
+
console.log(`OK
|
|
20667
20667
|
`);
|
|
20668
20668
|
if (keyWasPrompted) {
|
|
20669
20669
|
const isWin = process.platform === "win32";
|
|
20670
|
-
const persistCmd = isWin ?
|
|
20670
|
+
const persistCmd = isWin ? `$env:MEMLY_API_KEY = "${apiKey}"` : `export MEMLY_API_KEY="${apiKey}"`;
|
|
20671
20671
|
console.log(" To persist this key, add to your shell profile:");
|
|
20672
20672
|
console.log(` ${persistCmd}
|
|
20673
20673
|
`);
|
|
@@ -20703,17 +20703,25 @@ No API key provided. Aborting.
|
|
|
20703
20703
|
const jetbrainsResult = writeJetBrains(projectRoot);
|
|
20704
20704
|
if (jetbrainsResult)
|
|
20705
20705
|
results.push(jetbrainsResult);
|
|
20706
|
-
const
|
|
20707
|
-
|
|
20706
|
+
const statusLabel = (r) => {
|
|
20707
|
+
if (r.status === "created")
|
|
20708
|
+
return "[created]";
|
|
20709
|
+
if (r.status === "updated")
|
|
20710
|
+
return "[updated]";
|
|
20711
|
+
if (r.status === "skipped")
|
|
20712
|
+
return "[skipped]";
|
|
20713
|
+
return "[FAILED] ";
|
|
20714
|
+
};
|
|
20715
|
+
console.log(`
|
|
20716
|
+
Results:
|
|
20708
20717
|
`);
|
|
20709
|
-
console.log(" IDE
|
|
20710
|
-
console.log("
|
|
20718
|
+
console.log(" IDE Status File");
|
|
20719
|
+
console.log(" " + "-".repeat(72));
|
|
20711
20720
|
for (const r of results) {
|
|
20712
20721
|
const rel = r.file.replace(projectRoot, ".").replace(homedir(), "~");
|
|
20713
|
-
|
|
20714
|
-
console.log(` ${icons[r.status]} ${r.ide.padEnd(28)} ${r.status.padEnd(8)} ${rel}`);
|
|
20722
|
+
console.log(` ${r.ide.padEnd(30)} ${statusLabel(r).padEnd(10)} ${rel}`);
|
|
20715
20723
|
if (r.status === "failed")
|
|
20716
|
-
console.log(`
|
|
20724
|
+
console.log(` Error: ${r.error}`);
|
|
20717
20725
|
}
|
|
20718
20726
|
if (results.length === 0) {
|
|
20719
20727
|
console.log(`
|
|
@@ -20734,7 +20742,7 @@ Resolving project ID... `);
|
|
|
20734
20742
|
if (projectId) {
|
|
20735
20743
|
try {
|
|
20736
20744
|
writeFileSync(join(projectRoot, ".memly-project"), JSON.stringify({ project_id: projectId }, null, 2));
|
|
20737
|
-
console.log(
|
|
20745
|
+
console.log(projectId);
|
|
20738
20746
|
const MARKER = `<!-- memly-project:${projectId} -->`;
|
|
20739
20747
|
const ideFiles = [
|
|
20740
20748
|
join(projectRoot, ".cursorrules"),
|
|
@@ -20754,11 +20762,11 @@ Resolving project ID... `);
|
|
|
20754
20762
|
}
|
|
20755
20763
|
} catch {}
|
|
20756
20764
|
} else {
|
|
20757
|
-
console.log("
|
|
20765
|
+
console.log("skipped (proxy unreachable - run init again after connecting)");
|
|
20758
20766
|
}
|
|
20759
20767
|
await reportTelemetry(results);
|
|
20760
20768
|
console.log(`
|
|
20761
|
-
|
|
20769
|
+
--------------------------------
|
|
20762
20770
|
`);
|
|
20763
20771
|
console.log(`Setup complete. Next steps:
|
|
20764
20772
|
`);
|