@prom.codes/memory-mcp 0.17.0 → 0.18.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/dist/bin.js +19 -19
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -2200,7 +2200,7 @@ function applyRecorderHooks(opts = {}) {
|
|
|
2200
2200
|
hookPath,
|
|
2201
2201
|
events: opts.uninstall ? [] : [...RECORDER_EVENTS],
|
|
2202
2202
|
backup,
|
|
2203
|
-
note: opts.uninstall ? "Removed the
|
|
2203
|
+
note: opts.uninstall ? "Removed the prom.codes session recorder hooks. Reload your Claude Code window(s)." : "Installed the session recorder (opt-in). Reload / restart your Claude Code window(s). It records LOCALLY to ~/.prometheus/recorder; nothing is uploaded. Uninstall anytime with recorder_setup { uninstall: true }."
|
|
2204
2204
|
};
|
|
2205
2205
|
}
|
|
2206
2206
|
|
|
@@ -3949,9 +3949,9 @@ var MEMORY_RUNTIMES = [
|
|
|
3949
3949
|
];
|
|
3950
3950
|
var BLOCK_START = "<!-- prometheus-memory:start -->";
|
|
3951
3951
|
var BLOCK_END = "<!-- prometheus-memory:end -->";
|
|
3952
|
-
var RULE_BLOCK = `##
|
|
3952
|
+
var RULE_BLOCK = `## prom.codes Agent Memory
|
|
3953
3953
|
|
|
3954
|
-
This workspace uses the
|
|
3954
|
+
This workspace uses the prom.codes memory MCP server (\`memory_*\` tools).
|
|
3955
3955
|
Follow this protocol:
|
|
3956
3956
|
|
|
3957
3957
|
1. **Session start:** call \`memory_read\` once before non-trivial work to
|
|
@@ -3976,7 +3976,7 @@ ${block}
|
|
|
3976
3976
|
${BLOCK_END}`;
|
|
3977
3977
|
}
|
|
3978
3978
|
var CURSOR_FRONTMATTER = `---
|
|
3979
|
-
description:
|
|
3979
|
+
description: prom.codes agent memory protocol
|
|
3980
3980
|
alwaysApply: true
|
|
3981
3981
|
---
|
|
3982
3982
|
|
|
@@ -4531,7 +4531,7 @@ ${f.value}`);
|
|
|
4531
4531
|
});
|
|
4532
4532
|
reg("setup", {
|
|
4533
4533
|
title: "Install memory rules into runtime configs",
|
|
4534
|
-
description: "Idempotently install the
|
|
4534
|
+
description: "Idempotently install the prom.codes memory-protocol rule block into agent runtime configs in this workspace: CLAUDE.md (claude-code), .cursor/rules/prometheus-memory.mdc (cursor), .augment/rules/prometheus-memory.md (augment), AGENTS.md (agents). Without `runtimes` it auto-detects which runtimes are present (fallback: agents). Only the marked block is written \u2014 existing content is never touched. Re-running updates the block in place.",
|
|
4535
4535
|
inputSchema: setupInput
|
|
4536
4536
|
}, async (args) => {
|
|
4537
4537
|
const deps = await ready();
|
|
@@ -4553,7 +4553,7 @@ ${f.value}`);
|
|
|
4553
4553
|
});
|
|
4554
4554
|
reg("recorder_setup", {
|
|
4555
4555
|
title: "Install the Session Recorder (opt-in)",
|
|
4556
|
-
description: "Install (or, with `uninstall: true`, remove) the
|
|
4556
|
+
description: "Install (or, with `uninstall: true`, remove) the prom.codes Session Recorder \u2014 Claude Code hooks that capture your coding sessions LOCALLY so memory-mcp can recall what you did and distil durable knowledge. STRICTLY OPT-IN and reversible: this writes a hook script + 5 hook entries (SessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd) into settings.json (backed up first). It records BEHAVIOUR, not code \u2014 tool names + short previews, with secrets redacted and sensitive-file contents skipped \u2014 as append-only JSONL under ~/.prometheus/recorder/. NOTHING is uploaded; it never leaves your machine. `scope`: 'project-local' (default \u2014 this project only, .claude/settings.local.json), 'project' (committed .claude/settings.json), or 'user' (~/.claude/settings.json, every project). After install/uninstall, RELOAD your Claude Code window(s). Claude-Code-specific (Cursor/VS Code do not run hooks).",
|
|
4557
4557
|
inputSchema: recorderSetupInput
|
|
4558
4558
|
}, async (args) => {
|
|
4559
4559
|
const deps = await ready();
|
|
@@ -4648,7 +4648,7 @@ ${f.value}`);
|
|
|
4648
4648
|
embeddingsError = err instanceof Error ? err.message : String(err);
|
|
4649
4649
|
}
|
|
4650
4650
|
}
|
|
4651
|
-
const update = await buildUpdateStatus("@prom.codes/memory-mcp", "0.
|
|
4651
|
+
const update = await buildUpdateStatus("@prom.codes/memory-mcp", "0.18.0", { isDevBuild: false });
|
|
4652
4652
|
let recorder;
|
|
4653
4653
|
try {
|
|
4654
4654
|
const scopes = ["project-local", "project", "user"];
|
|
@@ -4729,11 +4729,11 @@ ${f.value}`);
|
|
|
4729
4729
|
|
|
4730
4730
|
// dist/server.js
|
|
4731
4731
|
var SERVER_IDENTITY = {
|
|
4732
|
-
name: "
|
|
4733
|
-
version: "0.
|
|
4732
|
+
name: "prom.codes-memory",
|
|
4733
|
+
version: "0.18.0",
|
|
4734
4734
|
title: "prom.codes Memory"
|
|
4735
4735
|
};
|
|
4736
|
-
var SERVER_INSTRUCTIONS = "Persistent agent memory for this workspace \u2014 USE IT PROACTIVELY; the user will not tell you to. Protocol:\n1. ONE-TIME: if this workspace has no
|
|
4736
|
+
var SERVER_INSTRUCTIONS = "Persistent agent memory for this workspace \u2014 USE IT PROACTIVELY; the user will not tell you to. Protocol:\n1. ONE-TIME: if this workspace has no prom.codes memory rule yet, call memory_setup now (idempotent) so the protocol is installed into the runtime rule files and survives future sessions. (The server also auto-installs it on startup when a project rule file already exists \u2014 memory_setup covers the rest.)\n2. SESSION START: before any non-trivial task, call memory_read to recall facts, decisions and procedures from earlier sessions.\n3. DURING WORK: when the user states a durable preference, decision, correction or project fact, store it with memory_write (semantic for facts, procedural for how-tos) \u2014 without being asked.\n4. LOOK-UP: use memory_search for keyword recall when memory_read is not specific enough.\n5. SESSION END: consolidate what was learned with memory_capture.\nCall memory_status anytime to check what is stored and whether the rule is installed. Never store secrets, API keys or credentials \u2014 such writes are rejected.";
|
|
4737
4737
|
|
|
4738
4738
|
// dist/bin.js
|
|
4739
4739
|
function looksLikeMissingNativeBinding(msg) {
|
|
@@ -4784,7 +4784,7 @@ async function main() {
|
|
|
4784
4784
|
if (shuttingDown)
|
|
4785
4785
|
return;
|
|
4786
4786
|
shuttingDown = true;
|
|
4787
|
-
process.stderr.write(`
|
|
4787
|
+
process.stderr.write(`prom.codes-memory: ${reason}, shutting down
|
|
4788
4788
|
`);
|
|
4789
4789
|
watchdog?.stop();
|
|
4790
4790
|
if (recorderTimer !== null)
|
|
@@ -4805,7 +4805,7 @@ async function main() {
|
|
|
4805
4805
|
server.server.onclose = () => void shutdown("transport closed (client exited)");
|
|
4806
4806
|
watchdog = createIdleWatchdog({ onIdle: (reason) => void shutdown(reason), env });
|
|
4807
4807
|
if (watchdog.idleMs > 0) {
|
|
4808
|
-
process.stderr.write(`
|
|
4808
|
+
process.stderr.write(`prom.codes-memory: idle self-exit armed (${Math.round(watchdog.idleMs / 6e4)} min of no client activity)
|
|
4809
4809
|
`);
|
|
4810
4810
|
}
|
|
4811
4811
|
const armIdleWatch = () => {
|
|
@@ -4820,7 +4820,7 @@ async function main() {
|
|
|
4820
4820
|
env,
|
|
4821
4821
|
...override !== void 0 && override !== "" ? { workspaceRootOverride: override } : {}
|
|
4822
4822
|
});
|
|
4823
|
-
process.stderr.write(`
|
|
4823
|
+
process.stderr.write(`prom.codes-memory: workspace=${composed.workspaceRoot} (via ${via}) project=${composed.projectName} (${composed.projectId}) db=${composed.dbPath} embed=${composed.embedderId}${composed.embeddingsEnabled ? "" : " (keyword-only)"} rerank=${composed.rerankerId} extract=${composed.extractorId} rewrite=${composed.rewriterId} temporal=${composed.temporalEnabled ? "on" : "off"} dedup=${composed.dedupEnabled ? "on" : "off"}
|
|
4824
4824
|
`);
|
|
4825
4825
|
heartbeat.update({
|
|
4826
4826
|
workspaceRoot: composed.workspaceRoot,
|
|
@@ -4832,13 +4832,13 @@ async function main() {
|
|
|
4832
4832
|
}
|
|
4833
4833
|
});
|
|
4834
4834
|
if (composed.rootIsHomeOrFsRoot) {
|
|
4835
|
-
process.stderr.write(`
|
|
4835
|
+
process.stderr.write(`prom.codes-memory: workspace resolved to ${composed.workspaceRoot} (your home directory or a filesystem root) \u2014 project memories will NOT be mirrored to markdown there. Open a project folder (Claude Code passes it via CLAUDE_PROJECT_DIR) or set PROMETHEUS_WORKSPACE_ROOT. Call memory_status for details.
|
|
4836
4836
|
`);
|
|
4837
4837
|
} else if (composed.autoSetup) {
|
|
4838
4838
|
void autoInstallExisting(composed.workspaceRoot).then((results) => {
|
|
4839
4839
|
const wrote = results.filter((r) => r.action !== "unchanged");
|
|
4840
4840
|
if (wrote.length > 0) {
|
|
4841
|
-
process.stderr.write(`
|
|
4841
|
+
process.stderr.write(`prom.codes-memory: auto-installed the memory rule into ${wrote.map((r) => r.runtime).join(", ")} (set PROMETHEUS_MEMORY_AUTO_SETUP=off to disable)
|
|
4842
4842
|
`);
|
|
4843
4843
|
}
|
|
4844
4844
|
}).catch(() => {
|
|
@@ -4849,7 +4849,7 @@ async function main() {
|
|
|
4849
4849
|
try {
|
|
4850
4850
|
const r = await composed.recorder.ingestSpoolDir(composed.projectId, env);
|
|
4851
4851
|
if (r.events > 0) {
|
|
4852
|
-
process.stderr.write(`
|
|
4852
|
+
process.stderr.write(`prom.codes-memory: recorder ingested ${r.events} event(s) from ${r.sessions} session(s); reclaimed ${r.deletedSpools} spool(s)
|
|
4853
4853
|
`);
|
|
4854
4854
|
}
|
|
4855
4855
|
const c = composed;
|
|
@@ -4865,7 +4865,7 @@ async function main() {
|
|
|
4865
4865
|
mirrorToFiles: !c.rootIsHomeOrFsRoot
|
|
4866
4866
|
}, s.sessionId);
|
|
4867
4867
|
if (outcome.curated) {
|
|
4868
|
-
process.stderr.write(`
|
|
4868
|
+
process.stderr.write(`prom.codes-memory: curated session ${s.sessionId} (${outcome.facts ?? 0} facts, ${outcome.procedures ?? 0} procedures)
|
|
4869
4869
|
`);
|
|
4870
4870
|
}
|
|
4871
4871
|
}
|
|
@@ -4894,7 +4894,7 @@ async function main() {
|
|
|
4894
4894
|
boot(fromRoots ?? process.cwd(), fromRoots !== null ? "MCP roots" : "cwd fallback (client advertised no roots)");
|
|
4895
4895
|
} catch (err) {
|
|
4896
4896
|
const message = err instanceof Error ? err.message : String(err);
|
|
4897
|
-
process.stderr.write(`
|
|
4897
|
+
process.stderr.write(`prom.codes-memory: fatal during boot: ${message}
|
|
4898
4898
|
`);
|
|
4899
4899
|
if (looksLikeMissingNativeBinding(message))
|
|
4900
4900
|
process.stderr.write(NATIVE_BINDING_HINT);
|
|
@@ -4911,7 +4911,7 @@ async function main() {
|
|
|
4911
4911
|
}
|
|
4912
4912
|
main().catch((err) => {
|
|
4913
4913
|
const message = err instanceof Error ? err.message : String(err);
|
|
4914
|
-
process.stderr.write(`
|
|
4914
|
+
process.stderr.write(`prom.codes-memory: fatal: ${message}
|
|
4915
4915
|
`);
|
|
4916
4916
|
if (looksLikeMissingNativeBinding(message))
|
|
4917
4917
|
process.stderr.write(NATIVE_BINDING_HINT);
|