cf-memory-mcp 3.33.0 → 3.34.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/bin/cf-memory-mcp.js +50 -4
- package/package.json +1 -1
package/bin/cf-memory-mcp.js
CHANGED
|
@@ -3870,6 +3870,8 @@ function parseCliArgs(rest) {
|
|
|
3870
3870
|
flags.md_path = rest[++i];
|
|
3871
3871
|
} else if (a.startsWith('--md=')) {
|
|
3872
3872
|
flags.md_path = a.slice('--md='.length);
|
|
3873
|
+
} else if (a === '--next-only') {
|
|
3874
|
+
flags.next_only = true;
|
|
3873
3875
|
} else if (a === '--older-than') {
|
|
3874
3876
|
// Accept "7d" / "30d" / "12h" / raw number (days).
|
|
3875
3877
|
const raw = rest[++i] || '';
|
|
@@ -3952,6 +3954,21 @@ async function runResumeCli() {
|
|
|
3952
3954
|
// offline-fallback cache, not just MCP-stdio usage.
|
|
3953
3955
|
if (found) server.saveResumeToDisk(response);
|
|
3954
3956
|
|
|
3957
|
+
// --next-only: print just the first next_step. Useful for
|
|
3958
|
+
// shell prompts, status bars, one-liner scripting:
|
|
3959
|
+
// $ cf-memory-mcp resume --next-only
|
|
3960
|
+
if (flags.next_only) {
|
|
3961
|
+
const next = (payload.next_actions && payload.next_actions[0])
|
|
3962
|
+
|| (payload.resume_handoff?.handoff?.next_steps && payload.resume_handoff.handoff.next_steps[0])
|
|
3963
|
+
|| '';
|
|
3964
|
+
if (next) {
|
|
3965
|
+
process.stdout.write(next + '\n');
|
|
3966
|
+
process.exit(0);
|
|
3967
|
+
} else {
|
|
3968
|
+
process.exit(3);
|
|
3969
|
+
}
|
|
3970
|
+
}
|
|
3971
|
+
|
|
3955
3972
|
// --md <path>: write the rendered markdown to a file instead of
|
|
3956
3973
|
// (or in addition to) stdout. Useful for piping to a markdown
|
|
3957
3974
|
// viewer or saving to the project.
|
|
@@ -4145,9 +4162,37 @@ async function runDeleteCli() {
|
|
|
4145
4162
|
if (previewIds.length > 10) {
|
|
4146
4163
|
process.stderr.write(` ... and ${preview.deleted_count - 10} more\n`);
|
|
4147
4164
|
}
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4165
|
+
// Interactive TTY: prompt for confirmation instead of
|
|
4166
|
+
// requiring --yes. Piped/non-TTY stdin falls through to
|
|
4167
|
+
// the "re-run with --yes" path (avoids hangs in scripts).
|
|
4168
|
+
if (process.stdin.isTTY && process.stderr.isTTY) {
|
|
4169
|
+
process.stderr.write(`\nProceed with deletion? [y/N] `);
|
|
4170
|
+
const answer = await new Promise((resolve) => {
|
|
4171
|
+
process.stdin.setEncoding('utf8');
|
|
4172
|
+
let buf = '';
|
|
4173
|
+
const onData = (chunk) => {
|
|
4174
|
+
buf += chunk;
|
|
4175
|
+
const nl = buf.indexOf('\n');
|
|
4176
|
+
if (nl !== -1) {
|
|
4177
|
+
process.stdin.removeListener('data', onData);
|
|
4178
|
+
process.stdin.pause();
|
|
4179
|
+
resolve(buf.slice(0, nl).trim().toLowerCase());
|
|
4180
|
+
}
|
|
4181
|
+
};
|
|
4182
|
+
process.stdin.on('data', onData);
|
|
4183
|
+
process.stdin.resume();
|
|
4184
|
+
});
|
|
4185
|
+
if (answer === 'y' || answer === 'yes') {
|
|
4186
|
+
// Fall through to the actual delete below.
|
|
4187
|
+
} else {
|
|
4188
|
+
process.stderr.write(`Aborted.\n`);
|
|
4189
|
+
process.exit(2);
|
|
4190
|
+
}
|
|
4191
|
+
} else {
|
|
4192
|
+
process.stderr.write(`\nRe-run with --yes to confirm:\n`);
|
|
4193
|
+
process.stderr.write(` cf-memory-mcp delete ${process.argv.slice(3).join(' ')} --yes\n`);
|
|
4194
|
+
process.exit(2);
|
|
4195
|
+
}
|
|
4151
4196
|
}
|
|
4152
4197
|
|
|
4153
4198
|
const deleteRes = await server.makeRequest({
|
|
@@ -4322,10 +4367,11 @@ complete -c cf-memory-mcp -l version -s v -d 'Show version'
|
|
|
4322
4367
|
|
|
4323
4368
|
// Per-command help texts. Used when "cf-memory-mcp <cmd> --help" is invoked.
|
|
4324
4369
|
const PER_COMMAND_HELP = {
|
|
4325
|
-
resume: `cf-memory-mcp resume [<session-id-prefix>] [--md path] [--json]
|
|
4370
|
+
resume: `cf-memory-mcp resume [<session-id-prefix>] [--md path] [--next-only] [--json]
|
|
4326
4371
|
Print the prior resume handoff (markdown by default).
|
|
4327
4372
|
<session-id-prefix> Optional: pick a specific session (>=8 char prefix or full UUID).
|
|
4328
4373
|
--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).
|
|
4329
4375
|
--json, -j Emit the full bootstrap payload as JSON for scripts.
|
|
4330
4376
|
Exit codes: 0 = handoff found, 3 = no handoff found.`,
|
|
4331
4377
|
list: `cf-memory-mcp list [--status S] [--since ISO] [--repo PATH] [--limit N] [--json]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cf-memory-mcp",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.34.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": {
|