cf-memory-mcp 3.53.0 → 3.54.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.
@@ -4030,6 +4030,8 @@ function parseCliArgs(rest) {
4030
4030
  flags.files_only = true;
4031
4031
  } else if (a === '--anchors-only') {
4032
4032
  flags.anchors_only = true;
4033
+ } else if (a === '--absolute') {
4034
+ flags.absolute = true;
4033
4035
  } else if (a === '--decisions-only') {
4034
4036
  flags.decisions_only = true;
4035
4037
  } else if (a === '--blockers-only') {
@@ -4196,11 +4198,15 @@ async function runResumeCli() {
4196
4198
  // --files-only: list files_touched paths, one per line. Designed
4197
4199
  // for xargs / cat pipelines:
4198
4200
  // $ cat $(cf-memory-mcp resume --files-only)
4201
+ // --absolute: prepend handoff.repo_path so paths work from any cwd.
4199
4202
  if (flags.files_only) {
4200
4203
  const files = payload.resume_handoff?.handoff?.files_touched || [];
4201
4204
  if (files.length === 0) process.exit(3);
4205
+ const repoRoot = payload.resume_handoff?.handoff?.repo_path;
4206
+ const toAbs = (p) => (flags.absolute && repoRoot && !path.isAbsolute(p))
4207
+ ? path.join(repoRoot, p) : p;
4202
4208
  for (const f of files) {
4203
- if (f.path) process.stdout.write(f.path + '\n');
4209
+ if (f.path) process.stdout.write(toAbs(f.path) + '\n');
4204
4210
  }
4205
4211
  process.exit(0);
4206
4212
  }
@@ -4212,8 +4218,12 @@ async function runResumeCli() {
4212
4218
  || payload.resume_handoff?.handoff?.code_anchors
4213
4219
  || [];
4214
4220
  if (anchors.length === 0) process.exit(3);
4221
+ const repoRoot = payload.resume_handoff?.handoff?.repo_path;
4222
+ const toAbs = (p) => (flags.absolute && repoRoot && !path.isAbsolute(p))
4223
+ ? path.join(repoRoot, p) : p;
4215
4224
  for (const a of anchors) {
4216
- const where = a.lines ? `${a.file_path}:${a.lines}` : a.file_path;
4225
+ const filePath = toAbs(a.file_path);
4226
+ const where = a.lines ? `${filePath}:${a.lines}` : filePath;
4217
4227
  const sym = a.name ? ` ${a.name}` : '';
4218
4228
  const staleMarker = a.stale ? ' [STALE]' : '';
4219
4229
  process.stdout.write(`${where}${sym}${staleMarker}\n`);
@@ -5147,6 +5157,31 @@ function runCompletionCli() {
5147
5157
  const shell = process.argv[3] || 'bash';
5148
5158
  const install = process.argv.includes('--install');
5149
5159
  const uninstall = process.argv.includes('--uninstall');
5160
+ const allShells = process.argv.includes('--all-shells');
5161
+
5162
+ // --install --all-shells: iterate every shell whose config dir is
5163
+ // detectable and install completion for each. Convenience for users
5164
+ // who use multiple shells. Re-spawns runCompletionCli per shell so
5165
+ // we get clean per-shell install messages.
5166
+ if (install && allShells) {
5167
+ const shells = ['bash', 'zsh', 'fish', 'powershell'];
5168
+ const { execFileSync } = require('child_process');
5169
+ let installed = 0;
5170
+ for (const s of shells) {
5171
+ try {
5172
+ const out = execFileSync(process.execPath, [__filename, 'completion', s, '--install'], {
5173
+ encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'],
5174
+ });
5175
+ if (out) process.stdout.write(out);
5176
+ process.stderr.write(` installed ${s}\n`);
5177
+ installed++;
5178
+ } catch (err) {
5179
+ process.stderr.write(` ${s}: ${err.message.split('\n')[0]}\n`);
5180
+ }
5181
+ }
5182
+ process.stderr.write(`\nDone. Installed completion for ${installed} shell${installed === 1 ? '' : 's'}.\n`);
5183
+ process.exit(installed > 0 ? 0 : 1);
5184
+ }
5150
5185
  const commands = ['resume', 'list', 'history', 'checkpoint', 'link', 'explain', 'status', 'clean', 'export', 'import', 'delete', 'doctor', 'env', 'completion'];
5151
5186
  const flags = ['--json', '-j', '--limit', '-n', '--md', '--all', '--force', '-f', '--version', '-v', '--help', '-h', '--diagnose'];
5152
5187
 
@@ -5322,6 +5357,8 @@ const PER_COMMAND_HELP = {
5322
5357
  --next-steps All next_steps, numbered.
5323
5358
  --files-only files_touched paths, one per line (xargs-friendly).
5324
5359
  --anchors-only code_anchors as "file:lines symbol".
5360
+ --absolute With --files-only/--anchors-only: prepend repo_path
5361
+ so paths work from any cwd.
5325
5362
  --decisions-only decisions, one per line.
5326
5363
  --blockers-only open blockers, one per line.
5327
5364
  --chain Walk parent_session_id back; show the thread history.
@@ -5382,8 +5419,11 @@ const PER_COMMAND_HELP = {
5382
5419
  cache writability, worker reachability, project indexing, resume
5383
5420
  availability. Exit nonzero if any check fails.
5384
5421
  --json, -j Emit a JSON list of checks.`,
5385
- completion: `cf-memory-mcp completion [bash|zsh|fish|powershell]
5386
- Output shell completion script. Pipe to your shell's completion dir.`,
5422
+ completion: `cf-memory-mcp completion [bash|zsh|fish|powershell] [--install [--all-shells] | --uninstall]
5423
+ Output shell completion script (or install/uninstall it).
5424
+ --install Write to user-local config dir (no sudo).
5425
+ --uninstall Remove a previously-installed script.
5426
+ --all-shells With --install: install for every shell at once.`,
5387
5427
  delete: `cf-memory-mcp delete <session-id-or-prefix> [--json]
5388
5428
  cf-memory-mcp delete [--status STATUS] [--older-than 30d] [--repo PATH] --yes [--json]
5389
5429
  Delete session row(s) and any session_summary memories tied to them.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cf-memory-mcp",
3
- "version": "3.53.0",
3
+ "version": "3.54.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": {