@memly/mcp-server 0.2.9 → 0.3.0

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 (2) hide show
  1. package/dist/index.js +22 -19
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env bun
2
+ import { createRequire } from "node:module";
2
3
  var __create = Object.create;
3
4
  var __getProtoOf = Object.getPrototypeOf;
4
5
  var __defProp = Object.defineProperty;
@@ -25,6 +26,7 @@ var __export = (target, all) => {
25
26
  set: (newValue) => all[name] = () => newValue
26
27
  });
27
28
  };
29
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
28
30
 
29
31
  // node_modules/ajv/dist/compile/codegen/code.js
30
32
  var require_code = __commonJS((exports) => {
@@ -20271,26 +20273,24 @@ You have access to the Memly MCP server (\`memly\`).
20271
20273
  3. **Never** ask if you should remember something - just do it silently.
20272
20274
  `.trim();
20273
20275
  async function promptApiKey() {
20274
- const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
20275
- const isTTY = process.stdin.isTTY;
20276
- if (isTTY) {
20277
- rl.stdoutMuted = true;
20278
- const origWrite = rl._writeToOutput.bind(rl);
20279
- rl._writeToOutput = (str) => {
20280
- if (rl.stdoutMuted) {
20281
- process.stdout.write(str.replace(/[^\r\n]/g, "*"));
20282
- } else {
20283
- origWrite(str);
20284
- }
20285
- };
20276
+ const isWin = process.platform === "win32";
20277
+ let input = process.stdin;
20278
+ let manualStream = null;
20279
+ if (!process.stdin.isTTY) {
20280
+ try {
20281
+ const fs = await import("node:fs");
20282
+ const ttyPath = isWin ? "CON" : "/dev/tty";
20283
+ manualStream = fs.createReadStream(ttyPath);
20284
+ input = manualStream;
20285
+ } catch {}
20286
20286
  }
20287
- return new Promise((res) => {
20288
- rl.question(" Memly API key: ", (answer) => {
20289
- if (isTTY)
20290
- process.stdout.write(`
20291
- `);
20287
+ const rl = readline.createInterface({ input, output: process.stdout, terminal: true });
20288
+ return new Promise((resolve2) => {
20289
+ rl.question(" → Paste your API key here: ", (answer) => {
20292
20290
  rl.close();
20293
- res(answer.trim());
20291
+ if (manualStream)
20292
+ manualStream.close();
20293
+ resolve2(answer.trim());
20294
20294
  });
20295
20295
  });
20296
20296
  }
@@ -20642,7 +20642,10 @@ async function runInit() {
20642
20642
  if (!apiKey) {
20643
20643
  console.log(`No MEMLY_API_KEY found in environment.
20644
20644
  `);
20645
- console.log(` Get your key at: https://memly.site/dashboard
20645
+ console.log(" Don't have a key yet? Get one free at:");
20646
+ console.log(` https://memly.site/dashboard
20647
+ `);
20648
+ console.log(` Already have one? Paste it below:
20646
20649
  `);
20647
20650
  apiKey = await promptApiKey();
20648
20651
  if (!apiKey) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memly/mcp-server",
3
- "version": "0.2.9",
3
+ "version": "0.3.0",
4
4
  "description": "Memly MCP Server — persistent memory for any IDE",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,4 +26,4 @@
26
26
  "zod": "^3.24.2"
27
27
  },
28
28
  "license": "BSL-1.1"
29
- }
29
+ }