@memoraone/mcp 0.1.8 → 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.js → cli.cjs}
RENAMED
|
@@ -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
|
-
|
|
153
|
-
|
|
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.
|
|
547
|
+
console.debug("[memoraone-mcp] heartbeat error (silent)", err);
|
|
540
548
|
}
|
|
541
549
|
}
|
|
542
550
|
function redactSensitiveFields(obj) {
|
|
@@ -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
|
-
|
|
153
|
-
|
|
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.
|
|
547
|
+
console.debug("[memoraone-mcp] heartbeat error (silent)", err);
|
|
540
548
|
}
|
|
541
549
|
}
|
|
542
550
|
function redactSensitiveFields(obj) {
|
package/package.json
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memoraone/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "dist/index.
|
|
5
|
+
"main": "dist/index.cjs",
|
|
6
6
|
"bin": {
|
|
7
|
-
"memoraone-mcp": "dist/
|
|
7
|
+
"memoraone-mcp": "dist-bin/memoraone-mcp.cjs"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
|
-
"dist"
|
|
10
|
+
"dist",
|
|
11
|
+
"dist-bin"
|
|
11
12
|
],
|
|
12
13
|
"publishConfig": {
|
|
13
14
|
"access": "public"
|
|
14
15
|
},
|
|
15
16
|
"scripts": {
|
|
16
|
-
"build": "tsup",
|
|
17
|
+
"build": "tsup && node scripts/writeBinWrapper.cjs",
|
|
17
18
|
"prepublishOnly": "pnpm run build",
|
|
18
19
|
"dev": "tsx src/index.ts",
|
|
19
20
|
"lint": "eslint ."
|