cf-memory-mcp 3.34.0 → 3.35.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.
@@ -3872,6 +3872,12 @@ function parseCliArgs(rest) {
3872
3872
  flags.md_path = a.slice('--md='.length);
3873
3873
  } else if (a === '--next-only') {
3874
3874
  flags.next_only = true;
3875
+ } else if (a === '--next-steps') {
3876
+ flags.next_steps = true;
3877
+ } else if (a === '--files-only') {
3878
+ flags.files_only = true;
3879
+ } else if (a === '--anchors-only') {
3880
+ flags.anchors_only = true;
3875
3881
  } else if (a === '--older-than') {
3876
3882
  // Accept "7d" / "30d" / "12h" / raw number (days).
3877
3883
  const raw = rest[++i] || '';
@@ -3969,6 +3975,45 @@ async function runResumeCli() {
3969
3975
  }
3970
3976
  }
3971
3977
 
3978
+ // --next-steps: print all next_steps, numbered. Good for piping
3979
+ // to a task tracker or quick visual scan.
3980
+ if (flags.next_steps) {
3981
+ const steps = payload.next_actions
3982
+ || payload.resume_handoff?.handoff?.next_steps
3983
+ || [];
3984
+ if (steps.length === 0) process.exit(3);
3985
+ steps.forEach((s, i) => process.stdout.write(`${i + 1}. ${s}\n`));
3986
+ process.exit(0);
3987
+ }
3988
+
3989
+ // --files-only: list files_touched paths, one per line. Designed
3990
+ // for xargs / cat pipelines:
3991
+ // $ cat $(cf-memory-mcp resume --files-only)
3992
+ if (flags.files_only) {
3993
+ const files = payload.resume_handoff?.handoff?.files_touched || [];
3994
+ if (files.length === 0) process.exit(3);
3995
+ for (const f of files) {
3996
+ if (f.path) process.stdout.write(f.path + '\n');
3997
+ }
3998
+ process.exit(0);
3999
+ }
4000
+
4001
+ // --anchors-only: list code_anchors as "file:lines symbol".
4002
+ // Useful for jump-to-line tooling.
4003
+ if (flags.anchors_only) {
4004
+ const anchors = payload.active_code_context
4005
+ || payload.resume_handoff?.handoff?.code_anchors
4006
+ || [];
4007
+ if (anchors.length === 0) process.exit(3);
4008
+ for (const a of anchors) {
4009
+ const where = a.lines ? `${a.file_path}:${a.lines}` : a.file_path;
4010
+ const sym = a.name ? ` ${a.name}` : '';
4011
+ const staleMarker = a.stale ? ' [STALE]' : '';
4012
+ process.stdout.write(`${where}${sym}${staleMarker}\n`);
4013
+ }
4014
+ process.exit(0);
4015
+ }
4016
+
3972
4017
  // --md <path>: write the rendered markdown to a file instead of
3973
4018
  // (or in addition to) stdout. Useful for piping to a markdown
3974
4019
  // viewer or saving to the project.
@@ -4367,13 +4412,16 @@ complete -c cf-memory-mcp -l version -s v -d 'Show version'
4367
4412
 
4368
4413
  // Per-command help texts. Used when "cf-memory-mcp <cmd> --help" is invoked.
4369
4414
  const PER_COMMAND_HELP = {
4370
- resume: `cf-memory-mcp resume [<session-id-prefix>] [--md path] [--next-only] [--json]
4415
+ resume: `cf-memory-mcp resume [<session-id-prefix>] [--md path] [--next-only|--next-steps|--files-only|--anchors-only] [--json]
4371
4416
  Print the prior resume handoff (markdown by default).
4372
4417
  <session-id-prefix> Optional: pick a specific session (>=8 char prefix or full UUID).
4373
4418
  --md <path> Write the markdown to a file instead of stdout.
4374
- --next-only Print just the first next_step (for shell prompts / one-liners).
4419
+ --next-only Print just the first next_step (for shell prompts).
4420
+ --next-steps Print ALL next_steps, numbered.
4421
+ --files-only Print files_touched paths, one per line (xargs-friendly).
4422
+ --anchors-only Print code_anchors as "file:lines symbol".
4375
4423
  --json, -j Emit the full bootstrap payload as JSON for scripts.
4376
- Exit codes: 0 = handoff found, 3 = no handoff found.`,
4424
+ Exit codes: 0 = handoff found, 3 = no handoff or no data for the flag.`,
4377
4425
  list: `cf-memory-mcp list [--status S] [--since ISO] [--repo PATH] [--limit N] [--json]
4378
4426
  List recent handoffs for the current cwd, status-ranked. Header shows
4379
4427
  a status-count summary.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cf-memory-mcp",
3
- "version": "3.34.0",
3
+ "version": "3.35.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": {