cf-memory-mcp 3.8.8 → 3.8.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.
@@ -851,6 +851,7 @@ class CFMemoryMCP {
851
851
  project_id: projectId,
852
852
  files_refreshed: 0,
853
853
  skipped,
854
+ hint: `All ${filePaths.length} file path(s) failed to read. Check that paths are relative to project_root (${projectRoot}). If the project was indexed from a different directory, pass project_root=<that directory>.`,
854
855
  });
855
856
  }
856
857
 
@@ -903,8 +904,17 @@ class CFMemoryMCP {
903
904
 
904
905
  let filesList = [];
905
906
  try {
906
- filesList = JSON.parse(listFilesRes.result.content[0].text);
907
- if (!Array.isArray(filesList)) filesList = [];
907
+ const parsed = JSON.parse(listFilesRes.result.content[0].text);
908
+ if (Array.isArray(parsed)) {
909
+ filesList = parsed;
910
+ } else if (parsed && parsed.error) {
911
+ // Server returned {error, hint} — surface it instead of
912
+ // pretending there are zero indexed files.
913
+ return respond({
914
+ error: parsed.error,
915
+ hint: parsed.hint || `find_stale_files needs a valid project_id; got "${projectIdOrName}"`,
916
+ });
917
+ }
908
918
  } catch (_) {
909
919
  return respond({ error: 'Failed to list indexed files' });
910
920
  }
@@ -984,8 +994,15 @@ class CFMemoryMCP {
984
994
  });
985
995
  let filesList = [];
986
996
  try {
987
- filesList = JSON.parse(listRes.result.content[0].text);
988
- if (!Array.isArray(filesList)) filesList = [];
997
+ const parsed = JSON.parse(listRes.result.content[0].text);
998
+ if (Array.isArray(parsed)) {
999
+ filesList = parsed;
1000
+ } else if (parsed && parsed.error) {
1001
+ return respond({
1002
+ error: parsed.error,
1003
+ hint: parsed.hint || `refresh_stale needs a valid project_id; got "${projectIdOrName}"`,
1004
+ });
1005
+ }
989
1006
  } catch (_) {
990
1007
  return respond({ error: 'Failed to list indexed files' });
991
1008
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cf-memory-mcp",
3
- "version": "3.8.8",
3
+ "version": "3.8.10",
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": {