@memoraone/mcp 0.1.9 → 0.1.10

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) {
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memoraone/mcp",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {