@memoraone/mcp 0.1.31 → 0.1.32

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/cli.cjs +14 -5
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -30,7 +30,7 @@ var require_package = __commonJS({
30
30
  "package.json"(exports2, module2) {
31
31
  module2.exports = {
32
32
  name: "@memoraone/mcp",
33
- version: "0.1.31",
33
+ version: "0.1.32",
34
34
  type: "module",
35
35
  main: "dist/index.cjs",
36
36
  bin: {
@@ -1161,9 +1161,12 @@ var path6 = __toESM(require("path"), 1);
1161
1161
  var import_node_child_process2 = require("child_process");
1162
1162
  var import_node_util = require("util");
1163
1163
  var execFileAsync = (0, import_node_util.promisify)(import_node_child_process2.execFile);
1164
+ var MEMORAONE_PROD_API_URL = "https://api.memoraone.com";
1165
+ var MEMORAONE_LOCAL_API_URL = "http://localhost:3001";
1166
+ var MEMORAONE_STAGING_API_URL_PREFIX = "https://memora-api-staging-";
1164
1167
  function buildMemoraoneCursorMcpServer(npxPath, workspaceRoot) {
1165
1168
  const env = {
1166
- MEMORAONE_API_URL: "https://api.memoraone.com",
1169
+ MEMORAONE_API_URL: MEMORAONE_PROD_API_URL,
1167
1170
  MEMORAONE_IDE_TYPE: "cursor"
1168
1171
  };
1169
1172
  if (workspaceRoot !== void 0) {
@@ -1275,6 +1278,12 @@ function mergeCursorRepoMcpConfigObject(existing, npxPath, repoRoot) {
1275
1278
  mcpServers.memoraone = buildMemoraoneCursorMcpServer(npxPath, repoRoot);
1276
1279
  return { ...base, mcpServers };
1277
1280
  }
1281
+ function isMemoraoneManagedApiUrl(url) {
1282
+ if (typeof url !== "string" || url.length === 0) return false;
1283
+ if (url === MEMORAONE_PROD_API_URL) return true;
1284
+ if (url === MEMORAONE_LOCAL_API_URL) return true;
1285
+ return url.startsWith(MEMORAONE_STAGING_API_URL_PREFIX);
1286
+ }
1278
1287
  function isManagedMemoraoneCursorServer(server) {
1279
1288
  if (!server || typeof server !== "object") return false;
1280
1289
  const s = server;
@@ -1282,7 +1291,7 @@ function isManagedMemoraoneCursorServer(server) {
1282
1291
  if (s.args[0] !== "-y" || s.args[1] !== "@memoraone/mcp@latest") return false;
1283
1292
  const env = s.env;
1284
1293
  if (!env || typeof env !== "object") return false;
1285
- return memoraoneEnvMatchesBase(env);
1294
+ return memoraoneEnvMatchesManagedCleanupShape(env);
1286
1295
  }
1287
1296
  function cursorConfigHasManagedMemoraone(parsed) {
1288
1297
  if (!parsed || typeof parsed !== "object") return false;
@@ -1290,8 +1299,8 @@ function cursorConfigHasManagedMemoraone(parsed) {
1290
1299
  if (!mcpServers || typeof mcpServers !== "object" || Array.isArray(mcpServers)) return false;
1291
1300
  return isManagedMemoraoneCursorServer(mcpServers.memoraone);
1292
1301
  }
1293
- function memoraoneEnvMatchesBase(env) {
1294
- return env.MEMORAONE_API_URL === "https://api.memoraone.com" && env.MEMORAONE_IDE_TYPE === "cursor";
1302
+ function memoraoneEnvMatchesManagedCleanupShape(env) {
1303
+ return env.MEMORAONE_IDE_TYPE === "cursor" && isMemoraoneManagedApiUrl(env.MEMORAONE_API_URL);
1295
1304
  }
1296
1305
  function getCursorRepoMcpConfigPath(repoRoot) {
1297
1306
  return path6.join(repoRoot, ".cursor", "mcp.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memoraone/mcp",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {