cf-memory-mcp 3.37.0 → 3.38.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.
- package/bin/cf-memory-mcp.js +40 -0
- package/package.json +1 -1
package/bin/cf-memory-mcp.js
CHANGED
|
@@ -66,6 +66,32 @@ const STREAMABLE_HTTP_URL = `${BASE_URL}/mcp`;
|
|
|
66
66
|
const LEGACY_SERVER_URL = `${BASE_URL}/mcp/message`;
|
|
67
67
|
const PROGRESS_SSE_URL = `${BASE_URL}/api/indexing/progress`;
|
|
68
68
|
const PACKAGE_VERSION = require('../package.json').version;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Fetch the latest version of cf-memory-mcp from the npm registry.
|
|
72
|
+
* Returns the latest version string, or null on timeout/error.
|
|
73
|
+
* Used by `doctor` to flag outdated installs. Bounded by timeoutMs
|
|
74
|
+
* so an unreachable registry doesn't hang the doctor command.
|
|
75
|
+
*/
|
|
76
|
+
function checkLatestNpmVersion(currentVersion, timeoutMs = 1500) {
|
|
77
|
+
return new Promise((resolve) => {
|
|
78
|
+
const req = https.get('https://registry.npmjs.org/cf-memory-mcp/latest', {
|
|
79
|
+
timeout: timeoutMs,
|
|
80
|
+
headers: { 'Accept': 'application/json', 'User-Agent': `cf-memory-mcp/${currentVersion}` },
|
|
81
|
+
}, (res) => {
|
|
82
|
+
let body = '';
|
|
83
|
+
res.on('data', (chunk) => { body += chunk; });
|
|
84
|
+
res.on('end', () => {
|
|
85
|
+
try {
|
|
86
|
+
const parsed = JSON.parse(body);
|
|
87
|
+
resolve(parsed.version || null);
|
|
88
|
+
} catch (_) { resolve(null); }
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
req.on('error', () => resolve(null));
|
|
92
|
+
req.on('timeout', () => { req.destroy(); resolve(null); });
|
|
93
|
+
});
|
|
94
|
+
}
|
|
69
95
|
// Default per-request timeout. Batch uploads use BATCH_TIMEOUT_MS below.
|
|
70
96
|
const TIMEOUT_MS = 60000;
|
|
71
97
|
// Batch uploads can take longer because the worker processes each file
|
|
@@ -4648,6 +4674,20 @@ async function runDoctorCli() {
|
|
|
4648
4674
|
const checks = [];
|
|
4649
4675
|
const add = (label, ok, detail, fix) => checks.push({ label, ok, detail, ...(fix && !ok ? { fix } : {}) });
|
|
4650
4676
|
|
|
4677
|
+
// 0. Installed vs latest npm version. Best-effort: skipped on
|
|
4678
|
+
// network failure or when registry is unreachable. Doesn't add to
|
|
4679
|
+
// exit-code failures so doctor still passes if you're just behind.
|
|
4680
|
+
try {
|
|
4681
|
+
const latest = await checkLatestNpmVersion(PACKAGE_VERSION, 1500);
|
|
4682
|
+
if (latest && latest !== PACKAGE_VERSION) {
|
|
4683
|
+
add(`npm version current`, false,
|
|
4684
|
+
`installed v${PACKAGE_VERSION}, latest v${latest}`,
|
|
4685
|
+
`npm install -g cf-memory-mcp@latest # or: npx cf-memory-mcp@${latest}`);
|
|
4686
|
+
} else if (latest) {
|
|
4687
|
+
add(`npm version current`, true, `v${PACKAGE_VERSION} (latest)`);
|
|
4688
|
+
}
|
|
4689
|
+
} catch (_) { /* network failure or registry timeout — skip */ }
|
|
4690
|
+
|
|
4651
4691
|
// 1. API key set?
|
|
4652
4692
|
add('CF_MEMORY_API_KEY set', !!API_KEY,
|
|
4653
4693
|
API_KEY ? '(redacted)' : 'unset — most commands will fail',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cf-memory-mcp",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.38.0",
|
|
4
4
|
"description": "Cloudflare-hosted MCP server for code indexing, retrieval, and assistant memory with a direct remote MCP endpoint and local stdio bridge.",
|
|
5
5
|
"main": "bin/cf-memory-mcp.js",
|
|
6
6
|
"bin": {
|