@memoraone/mcp 0.1.9 → 0.1.11

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/cli.cjs CHANGED
@@ -149,10 +149,12 @@ var MemoraClient = class {
149
149
  }
150
150
  async post(path2, body, options) {
151
151
  const url = `${this.baseUrl}${path2.startsWith("/") ? path2 : `/${path2}`}`;
152
- process.stderr.write(
153
- `[memoraone-mcp] http url=${url} apiKeyPrefix=${String(this.apiKey).slice(0, 8)} apiKeyLen=${String(this.apiKey).length}
152
+ if (options?.log !== false) {
153
+ process.stderr.write(
154
+ `[memoraone-mcp] http url=${url} apiKeyPrefix=${String(this.apiKey).slice(0, 8)} apiKeyLen=${String(this.apiKey).length}
154
155
  `
155
- );
156
+ );
157
+ }
156
158
  const res = await requestJson(url, "POST", this.buildHeaders(options), body);
157
159
  if (!res.ok) {
158
160
  throw new MemoraOneHttpError(res.status, res.statusText, res.text);
@@ -161,6 +163,12 @@ var MemoraClient = class {
161
163
  }
162
164
  async get(path2, options) {
163
165
  const url = `${this.baseUrl}${path2.startsWith("/") ? path2 : `/${path2}`}`;
166
+ if (options?.log !== false) {
167
+ process.stderr.write(
168
+ `[memoraone-mcp] http url=${url} apiKeyPrefix=${String(this.apiKey).slice(0, 8)} apiKeyLen=${String(this.apiKey).length}
169
+ `
170
+ );
171
+ }
164
172
  const res = await requestJson(url, "GET", this.buildHeaders(options));
165
173
  if (!res.ok) {
166
174
  throw new MemoraOneHttpError(res.status, res.statusText, res.text);
@@ -534,9 +542,9 @@ async function handleSetProject(args) {
534
542
  // src/index.ts
535
543
  async function sendHeartbeat(client) {
536
544
  try {
537
- await client.post("/admin/api-keys/heartbeat", {});
545
+ await client.post("/admin/api-keys/heartbeat", {}, { log: false });
538
546
  } catch (err) {
539
- console.error("[memoraone-mcp] heartbeat error (silent)", err);
547
+ console.debug("[memoraone-mcp] heartbeat error (silent)", err);
540
548
  }
541
549
  }
542
550
  function redactSensitiveFields(obj) {
@@ -763,7 +771,7 @@ async function main() {
763
771
  };
764
772
  }
765
773
  );
766
- console.error("[memoraone-mcp] Starting MCP server with", registeredToolNames.length, "tools");
774
+ console.info("[memoraone-mcp] Starting MCP server with", registeredToolNames.length, "tools");
767
775
  const transport = new import_stdio.StdioServerTransport();
768
776
  await server.connect(transport);
769
777
  let heartbeatInterval = null;
@@ -784,12 +792,12 @@ async function main() {
784
792
  if (globalThis.__memoraHeartbeatInterval) {
785
793
  clearInterval(globalThis.__memoraHeartbeatInterval);
786
794
  }
787
- console.error(`[memoraone-mcp] Received ${signal}, shutting down`);
795
+ console.info(`[memoraone-mcp] Received ${signal}, shutting down`);
788
796
  process.exit(0);
789
797
  };
790
798
  process.on("SIGINT", () => shutdown("SIGINT"));
791
799
  process.on("SIGTERM", () => shutdown("SIGTERM"));
792
- console.error("[memoraone-mcp] MCP server ready");
800
+ console.info("[memoraone-mcp] MCP server ready");
793
801
  }
794
802
  main().catch((err) => {
795
803
  console.error("[memoraone-mcp] fatal error", err);
package/dist/index.cjs CHANGED
@@ -149,10 +149,12 @@ var MemoraClient = class {
149
149
  }
150
150
  async post(path2, body, options) {
151
151
  const url = `${this.baseUrl}${path2.startsWith("/") ? path2 : `/${path2}`}`;
152
- process.stderr.write(
153
- `[memoraone-mcp] http url=${url} apiKeyPrefix=${String(this.apiKey).slice(0, 8)} apiKeyLen=${String(this.apiKey).length}
152
+ if (options?.log !== false) {
153
+ process.stderr.write(
154
+ `[memoraone-mcp] http url=${url} apiKeyPrefix=${String(this.apiKey).slice(0, 8)} apiKeyLen=${String(this.apiKey).length}
154
155
  `
155
- );
156
+ );
157
+ }
156
158
  const res = await requestJson(url, "POST", this.buildHeaders(options), body);
157
159
  if (!res.ok) {
158
160
  throw new MemoraOneHttpError(res.status, res.statusText, res.text);
@@ -161,6 +163,12 @@ var MemoraClient = class {
161
163
  }
162
164
  async get(path2, options) {
163
165
  const url = `${this.baseUrl}${path2.startsWith("/") ? path2 : `/${path2}`}`;
166
+ if (options?.log !== false) {
167
+ process.stderr.write(
168
+ `[memoraone-mcp] http url=${url} apiKeyPrefix=${String(this.apiKey).slice(0, 8)} apiKeyLen=${String(this.apiKey).length}
169
+ `
170
+ );
171
+ }
164
172
  const res = await requestJson(url, "GET", this.buildHeaders(options));
165
173
  if (!res.ok) {
166
174
  throw new MemoraOneHttpError(res.status, res.statusText, res.text);
@@ -534,9 +542,9 @@ async function handleSetProject(args) {
534
542
  // src/index.ts
535
543
  async function sendHeartbeat(client) {
536
544
  try {
537
- await client.post("/admin/api-keys/heartbeat", {});
545
+ await client.post("/admin/api-keys/heartbeat", {}, { log: false });
538
546
  } catch (err) {
539
- console.error("[memoraone-mcp] heartbeat error (silent)", err);
547
+ console.debug("[memoraone-mcp] heartbeat error (silent)", err);
540
548
  }
541
549
  }
542
550
  function redactSensitiveFields(obj) {
@@ -763,7 +771,7 @@ async function main() {
763
771
  };
764
772
  }
765
773
  );
766
- console.error("[memoraone-mcp] Starting MCP server with", registeredToolNames.length, "tools");
774
+ console.info("[memoraone-mcp] Starting MCP server with", registeredToolNames.length, "tools");
767
775
  const transport = new import_stdio.StdioServerTransport();
768
776
  await server.connect(transport);
769
777
  let heartbeatInterval = null;
@@ -784,12 +792,12 @@ async function main() {
784
792
  if (globalThis.__memoraHeartbeatInterval) {
785
793
  clearInterval(globalThis.__memoraHeartbeatInterval);
786
794
  }
787
- console.error(`[memoraone-mcp] Received ${signal}, shutting down`);
795
+ console.info(`[memoraone-mcp] Received ${signal}, shutting down`);
788
796
  process.exit(0);
789
797
  };
790
798
  process.on("SIGINT", () => shutdown("SIGINT"));
791
799
  process.on("SIGTERM", () => shutdown("SIGTERM"));
792
- console.error("[memoraone-mcp] MCP server ready");
800
+ console.info("[memoraone-mcp] MCP server ready");
793
801
  }
794
802
  main().catch((err) => {
795
803
  console.error("[memoraone-mcp] fatal error", err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memoraone/mcp",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {