cf-memory-mcp 3.59.0 → 3.61.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/README.md CHANGED
@@ -59,7 +59,7 @@ Resume context also surfaces via:
59
59
  - **MCP resources**: `cfm://resume/current`, `cfm://resume/recent`, `cfm://resume/session/<id>`
60
60
  - **MCP prompts**: `/resume`, `/list_threads` (for clients with slash-command UI)
61
61
 
62
- **New to resume context?** Start with the [5-minute quick start](docs/RESUME_QUICKSTART.md).
62
+ **New to resume context?** Start with the [5-minute quick start](docs/RESUME_QUICKSTART.md). For version history, see [CHANGELOG.md](CHANGELOG.md).
63
63
 
64
64
  See [docs/RESUME_CONTEXT_PLAN.md](docs/RESUME_CONTEXT_PLAN.md) for design rationale, [agents.md](agents.md) for the full agent-facing reference, and [examples/](examples/) for copy-pasteable workflows (GitHub Actions, shell prompt, tmux status line, resume-or-checkpoint wrapper).
65
65
 
@@ -4051,6 +4051,14 @@ function parseCliArgs(rest) {
4051
4051
  flags.raw = true;
4052
4052
  } else if (a === '--copy') {
4053
4053
  flags.copy = true;
4054
+ } else if (a === '--watch') {
4055
+ flags.watch = true;
4056
+ } else if (a === '--interval') {
4057
+ const n = parseInt(rest[++i], 10);
4058
+ flags.interval = Number.isFinite(n) && n >= 5 ? Math.min(n, 600) : 30;
4059
+ } else if (a.startsWith('--interval=')) {
4060
+ const n = parseInt(a.slice('--interval='.length), 10);
4061
+ flags.interval = Number.isFinite(n) && n >= 5 ? Math.min(n, 600) : 30;
4054
4062
  } else if (a === '--card') {
4055
4063
  flags.card = true;
4056
4064
  } else if (a === '--short') {
@@ -4127,6 +4135,42 @@ async function runResumeCli() {
4127
4135
  process.exit(1);
4128
4136
  }
4129
4137
  const { positional, flags } = parseCliArgs(process.argv.slice(3));
4138
+
4139
+ // --watch: re-spawn this command without --watch on an interval,
4140
+ // clearing the screen between renders. Bounded by --interval (5-600s,
4141
+ // default 30s). Ctrl+C exits cleanly.
4142
+ if (flags.watch) {
4143
+ const interval = (flags.interval || 30) * 1000;
4144
+ const { spawnSync } = require('child_process');
4145
+ // Strip --watch from argv for the inner call. Pass everything else.
4146
+ const innerArgs = process.argv.slice(3).filter(a => a !== '--watch' && a !== '--interval' && !a.startsWith('--interval='))
4147
+ .filter((_, i, arr) => {
4148
+ // Also drop the value after --interval if it was separate.
4149
+ const prev = arr[i - 1];
4150
+ return prev !== '--interval';
4151
+ });
4152
+ let stopped = false;
4153
+ const onSig = () => { stopped = true; process.stderr.write('\n[watch] stopped\n'); process.exit(0); };
4154
+ process.on('SIGINT', onSig);
4155
+ process.on('SIGTERM', onSig);
4156
+ while (!stopped) {
4157
+ // Clear screen (ANSI). Skip when not a TTY (just append).
4158
+ if (process.stdout.isTTY) process.stdout.write('\x1b[2J\x1b[H');
4159
+ process.stdout.write(`[watch] ${new Date().toISOString()} (every ${interval/1000}s, Ctrl+C to exit)\n\n`);
4160
+ try {
4161
+ const res = spawnSync(process.execPath, [__filename, 'resume', ...innerArgs], {
4162
+ stdio: ['ignore', 'inherit', 'inherit'],
4163
+ });
4164
+ if (res.status !== 0 && res.status !== 3) {
4165
+ process.stderr.write(`\n[watch] resume exited ${res.status}\n`);
4166
+ }
4167
+ } catch (err) {
4168
+ process.stderr.write(`\n[watch] error: ${err.message}\n`);
4169
+ }
4170
+ await new Promise(r => setTimeout(r, interval));
4171
+ }
4172
+ process.exit(0);
4173
+ }
4130
4174
  const server = new CFMemoryMCP();
4131
4175
  server.logDebug = () => {};
4132
4176
  server.logError = (...a) => process.stderr.write(a.join(' ') + '\n');
@@ -5467,6 +5511,7 @@ const PER_COMMAND_HELP = {
5467
5511
  --md <path> Write the markdown to a file instead of stdout.
5468
5512
  --copy Pipe the markdown to the platform clipboard (pbcopy/xclip/wl-copy/clip).
5469
5513
  --card Compact 2-3 line status card (for terminal status widgets).
5514
+ --watch [--interval N] Re-render every N seconds (default 30, range 5-600). Ctrl+C to exit.
5470
5515
  Extract flags (pick one; each exits 3 if the section is empty):
5471
5516
  --next-only First next_step only (for shell prompts).
5472
5517
  --next-steps All next_steps, numbered.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cf-memory-mcp",
3
- "version": "3.59.0",
3
+ "version": "3.61.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": {