@prom.codes/memory-mcp 0.3.0 → 0.3.1
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 +6 -3
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -1153,7 +1153,8 @@ function composeFromEnv(opts) {
|
|
|
1153
1153
|
const env = opts.env;
|
|
1154
1154
|
const override = (opts.workspaceRootOverride ?? "").trim();
|
|
1155
1155
|
const envRoot = (env.PROMETHEUS_WORKSPACE_ROOT ?? "").trim();
|
|
1156
|
-
const
|
|
1156
|
+
const claudeRoot = (env.CLAUDE_PROJECT_DIR ?? "").trim();
|
|
1157
|
+
const workspaceRoot = resolve(override !== "" ? override : envRoot !== "" ? envRoot : claudeRoot !== "" ? claudeRoot : process.cwd());
|
|
1157
1158
|
const projectId = projectIdFor(workspaceRoot);
|
|
1158
1159
|
const projectName = basename(workspaceRoot) || workspaceRoot;
|
|
1159
1160
|
const rawDbPath = env.PROMETHEUS_MEMORY_DB_PATH;
|
|
@@ -1760,6 +1761,8 @@ var SERVER_INSTRUCTIONS = "Persistent agent memory for this workspace. At the ST
|
|
|
1760
1761
|
async function main() {
|
|
1761
1762
|
const env = process.env;
|
|
1762
1763
|
const explicitRoot = (env.PROMETHEUS_WORKSPACE_ROOT ?? "").trim();
|
|
1764
|
+
const claudeRoot = (env.CLAUDE_PROJECT_DIR ?? "").trim();
|
|
1765
|
+
const eagerVia = explicitRoot !== "" ? "PROMETHEUS_WORKSPACE_ROOT" : claudeRoot !== "" ? "CLAUDE_PROJECT_DIR" : null;
|
|
1763
1766
|
const transport = new StdioServerTransport();
|
|
1764
1767
|
const server = new McpServer2(SERVER_IDENTITY, {
|
|
1765
1768
|
capabilities: { tools: {} },
|
|
@@ -1788,8 +1791,8 @@ async function main() {
|
|
|
1788
1791
|
`);
|
|
1789
1792
|
registerTools(server, composed);
|
|
1790
1793
|
};
|
|
1791
|
-
if (
|
|
1792
|
-
boot(void 0,
|
|
1794
|
+
if (eagerVia !== null) {
|
|
1795
|
+
boot(void 0, eagerVia);
|
|
1793
1796
|
await server.connect(transport);
|
|
1794
1797
|
return;
|
|
1795
1798
|
}
|