cf-memory-mcp 3.51.0 → 3.52.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.
@@ -4091,6 +4091,10 @@ function parseCliArgs(rest) {
4091
4091
  flags.repo_path = rest[++i];
4092
4092
  } else if (a.startsWith('--repo=')) {
4093
4093
  flags.repo_path = a.slice('--repo='.length);
4094
+ } else if (a === '--project-id') {
4095
+ flags.project_id = rest[++i];
4096
+ } else if (a.startsWith('--project-id=')) {
4097
+ flags.project_id = a.slice('--project-id='.length);
4094
4098
  } else if (a === '--since') {
4095
4099
  flags.since = rest[++i];
4096
4100
  } else if (a.startsWith('--since=')) {
@@ -4121,9 +4125,20 @@ async function runResumeCli() {
4121
4125
  // Optional positional session_id argument.
4122
4126
  const sessionArg = positional[0];
4123
4127
  if (sessionArg) args.session_id_hint = sessionArg;
4124
- const fake = { params: { name: 'retrieve_context', arguments: {} } };
4125
- await server.maybeFillProjectId(fake);
4126
- if (fake.params.arguments.project_id) args.project_id = fake.params.arguments.project_id;
4128
+ // Cross-laptop overrides: --repo and --project-id let users bypass
4129
+ // cwd-based matching when paths differ across machines. --project-id
4130
+ // is the most reliable cross-machine anchor since it survives
4131
+ // path differences.
4132
+ if (flags.repo_path) {
4133
+ args.repo_path = flags.repo_path;
4134
+ // Don't auto-fill project_id from the local cwd when --repo
4135
+ // overrides (would otherwise short-circuit to a wrong session).
4136
+ } else {
4137
+ const fake = { params: { name: 'retrieve_context', arguments: {} } };
4138
+ await server.maybeFillProjectId(fake);
4139
+ if (fake.params.arguments.project_id) args.project_id = fake.params.arguments.project_id;
4140
+ }
4141
+ if (flags.project_id) args.project_id = flags.project_id;
4127
4142
 
4128
4143
  const response = await server.makeRequest({
4129
4144
  jsonrpc: '2.0',
@@ -4700,6 +4715,8 @@ async function runListCli() {
4700
4715
  await server.maybeFillProjectId(fake);
4701
4716
  if (fake.params.arguments.project_id) args.project_id = fake.params.arguments.project_id;
4702
4717
  }
4718
+ // --project-id explicit override (overrides any auto-fill above).
4719
+ if (flags.project_id) args.project_id = flags.project_id;
4703
4720
 
4704
4721
  const response = await server.makeRequest({
4705
4722
  jsonrpc: '2.0',
@@ -4879,6 +4896,9 @@ async function runHistoryCli() {
4879
4896
  await server.maybeFillProjectId(fake);
4880
4897
  if (fake.params.arguments.project_id) args.project_id = fake.params.arguments.project_id;
4881
4898
  }
4899
+ // --project-id overrides cwd-derived project_id. Useful when
4900
+ // resuming a project you haven't indexed on this machine.
4901
+ if (flags.project_id) args.project_id = flags.project_id;
4882
4902
 
4883
4903
  const response = await server.makeRequest({
4884
4904
  jsonrpc: '2.0',
@@ -5282,6 +5302,8 @@ const PER_COMMAND_HELP = {
5282
5302
  resume: `cf-memory-mcp resume [<session-id-prefix>] [--md path] [<extract-flag>] [--json]
5283
5303
  Print the prior resume handoff (markdown by default).
5284
5304
  <session-id-prefix> Optional: pick a specific session (>=8 char prefix or full UUID).
5305
+ --repo <path> Override cwd's repo (for cross-laptop or workspace-switch).
5306
+ --project-id <id> Override cwd's project_id (best for cross-laptop continuity).
5285
5307
  --md <path> Write the markdown to a file instead of stdout.
5286
5308
  --copy Pipe the markdown to the platform clipboard (pbcopy/xclip/wl-copy/clip).
5287
5309
  --card Compact 2-3 line status card (for terminal status widgets).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cf-memory-mcp",
3
- "version": "3.51.0",
3
+ "version": "3.52.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": {