cf-memory-mcp 3.24.0 → 3.25.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 +50 -0
- package/package.json +1 -1
package/bin/cf-memory-mcp.js
CHANGED
|
@@ -3750,6 +3750,8 @@ Usage:
|
|
|
3750
3750
|
npx cf-memory-mcp list List recent handoffs for cwd
|
|
3751
3751
|
npx cf-memory-mcp checkpoint ["<goal>"] Snapshot current state (keep_open)
|
|
3752
3752
|
npx cf-memory-mcp status Show bridge state + server resume availability
|
|
3753
|
+
npx cf-memory-mcp clean Delete local disk cache for current cwd
|
|
3754
|
+
npx cf-memory-mcp clean --all Delete ALL local disk caches
|
|
3753
3755
|
npx cf-memory-mcp --version Show version
|
|
3754
3756
|
npx cf-memory-mcp --help Show this help
|
|
3755
3757
|
npx cf-memory-mcp --diagnose Test connectivity and report issues
|
|
@@ -3928,6 +3930,49 @@ async function runListCli() {
|
|
|
3928
3930
|
}
|
|
3929
3931
|
}
|
|
3930
3932
|
|
|
3933
|
+
async function runCleanCli() {
|
|
3934
|
+
const { flags, positional } = parseCliArgs(process.argv.slice(3));
|
|
3935
|
+
const all = positional.includes('--all') || process.argv.includes('--all');
|
|
3936
|
+
const server = new CFMemoryMCP();
|
|
3937
|
+
server.logDebug = () => {};
|
|
3938
|
+
const removed = [];
|
|
3939
|
+
try {
|
|
3940
|
+
if (all) {
|
|
3941
|
+
// Clear ALL disk caches in ~/.cf-memory/.
|
|
3942
|
+
const dir = path.join(os.homedir(), '.cf-memory');
|
|
3943
|
+
if (fs.existsSync(dir)) {
|
|
3944
|
+
for (const entry of fs.readdirSync(dir)) {
|
|
3945
|
+
if (entry.startsWith('handoff-') && entry.endsWith('.json')) {
|
|
3946
|
+
const full = path.join(dir, entry);
|
|
3947
|
+
fs.unlinkSync(full);
|
|
3948
|
+
removed.push(full);
|
|
3949
|
+
}
|
|
3950
|
+
}
|
|
3951
|
+
}
|
|
3952
|
+
} else {
|
|
3953
|
+
const p = server.getDiskCachePath();
|
|
3954
|
+
if (p && fs.existsSync(p)) {
|
|
3955
|
+
fs.unlinkSync(p);
|
|
3956
|
+
removed.push(p);
|
|
3957
|
+
}
|
|
3958
|
+
}
|
|
3959
|
+
if (flags.json) {
|
|
3960
|
+
process.stdout.write(JSON.stringify({ removed }, null, 2) + '\n');
|
|
3961
|
+
process.exit(0);
|
|
3962
|
+
}
|
|
3963
|
+
if (removed.length === 0) {
|
|
3964
|
+
process.stdout.write('(nothing to clean)\n');
|
|
3965
|
+
} else {
|
|
3966
|
+
process.stdout.write(`Removed ${removed.length} cache file${removed.length === 1 ? '' : 's'}:\n`);
|
|
3967
|
+
for (const r of removed) process.stdout.write(` ${r}\n`);
|
|
3968
|
+
}
|
|
3969
|
+
process.exit(0);
|
|
3970
|
+
} catch (err) {
|
|
3971
|
+
console.error('clean command failed:', err.message);
|
|
3972
|
+
process.exit(1);
|
|
3973
|
+
}
|
|
3974
|
+
}
|
|
3975
|
+
|
|
3931
3976
|
async function runStatusCli() {
|
|
3932
3977
|
const { flags } = parseCliArgs(process.argv.slice(3));
|
|
3933
3978
|
const server = new CFMemoryMCP();
|
|
@@ -4112,6 +4157,11 @@ if (process.argv[2] === 'status') {
|
|
|
4112
4157
|
return;
|
|
4113
4158
|
}
|
|
4114
4159
|
|
|
4160
|
+
if (process.argv[2] === 'clean') {
|
|
4161
|
+
runCleanCli();
|
|
4162
|
+
return;
|
|
4163
|
+
}
|
|
4164
|
+
|
|
4115
4165
|
if (process.argv.includes('--diagnose')) {
|
|
4116
4166
|
(async () => {
|
|
4117
4167
|
console.log(`CF Memory MCP v${PACKAGE_VERSION} - Diagnostics`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cf-memory-mcp",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.25.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": {
|