specmem-hardwicksoftware 3.7.1 → 3.7.2
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.
|
@@ -117,10 +117,10 @@ const SOURCE_COMMANDS_DIR = path.join(SPECMEM_ROOT, 'commands');
|
|
|
117
117
|
const HOOK_ENV = {
|
|
118
118
|
SPECMEM_HOME: path.join(HOME_DIR, '.specmem'), // Dynamic path using os.homedir()
|
|
119
119
|
SPECMEM_PKG: SPECMEM_ROOT, // Use detected package root
|
|
120
|
-
// Per-project socket paths - ${
|
|
120
|
+
// Per-project socket paths - ${PWD} is expanded at MCP server startup
|
|
121
121
|
SPECMEM_RUN_DIR: '${cwd}/specmem/sockets',
|
|
122
122
|
SPECMEM_EMBEDDING_SOCKET: '${cwd}/specmem/sockets/embeddings.sock',
|
|
123
|
-
SPECMEM_PROJECT_PATH: '${
|
|
123
|
+
SPECMEM_PROJECT_PATH: '${PWD}', // Dynamically set by Code
|
|
124
124
|
SPECMEM_SEARCH_LIMIT: '5',
|
|
125
125
|
SPECMEM_THRESHOLD: '0.30',
|
|
126
126
|
SPECMEM_MAX_CONTENT: '200'
|
|
@@ -213,7 +213,7 @@ export function isSpecmemMcpConfigured(projectPath) {
|
|
|
213
213
|
if (projectPath) {
|
|
214
214
|
const configuredPath = specmem.env?.SPECMEM_PROJECT_PATH;
|
|
215
215
|
// ${PWD} and ${cwd} are expanded at runtime by Claude Code, so they're valid
|
|
216
|
-
if (configuredPath && configuredPath !== '${PWD}' && configuredPath !== '${
|
|
216
|
+
if (configuredPath && configuredPath !== '${PWD}' && configuredPath !== '${PWD}' && configuredPath !== projectPath) {
|
|
217
217
|
return false;
|
|
218
218
|
}
|
|
219
219
|
}
|
|
@@ -236,17 +236,16 @@ function configureMcpServer() {
|
|
|
236
236
|
config.mcpServers = {};
|
|
237
237
|
}
|
|
238
238
|
// Build the SpecMem MCP server config
|
|
239
|
-
// CRITICAL: ${
|
|
240
|
-
// NOTE: ${PWD} resolves at MCP server startup, ${cwd} resolves per-invocation
|
|
239
|
+
// CRITICAL: ${PWD} is expanded at MCP server startup to current working directory
|
|
241
240
|
const specmemConfig = {
|
|
242
241
|
command: 'node',
|
|
243
242
|
args: ['--max-old-space-size=250', BOOTSTRAP_PATH],
|
|
244
243
|
env: {
|
|
245
|
-
// Core paths - ${
|
|
244
|
+
// Core paths - ${PWD} gives us project isolation (dynamic per-directory)
|
|
246
245
|
HOME: HOME_DIR,
|
|
247
|
-
SPECMEM_PROJECT_PATH: '${
|
|
248
|
-
SPECMEM_WATCHER_ROOT_PATH: '${
|
|
249
|
-
SPECMEM_CODEBASE_PATH: '${
|
|
246
|
+
SPECMEM_PROJECT_PATH: '${PWD}',
|
|
247
|
+
SPECMEM_WATCHER_ROOT_PATH: '${PWD}',
|
|
248
|
+
SPECMEM_CODEBASE_PATH: '${PWD}',
|
|
250
249
|
// Database (use environment values or defaults)
|
|
251
250
|
SPECMEM_DB_HOST: process.env.SPECMEM_DB_HOST || 'localhost',
|
|
252
251
|
SPECMEM_DB_PORT: process.env.SPECMEM_DB_PORT || '5432',
|
|
@@ -332,7 +331,7 @@ function fixProjectMcpConfigs() {
|
|
|
332
331
|
if (!specmem.env) {
|
|
333
332
|
specmem.env = {};
|
|
334
333
|
}
|
|
335
|
-
if (!specmem.env.SPECMEM_PROJECT_PATH || specmem.env.SPECMEM_PROJECT_PATH === '${PWD}' || specmem.env.SPECMEM_PROJECT_PATH === '${
|
|
334
|
+
if (!specmem.env.SPECMEM_PROJECT_PATH || specmem.env.SPECMEM_PROJECT_PATH === '${PWD}' || specmem.env.SPECMEM_PROJECT_PATH === '${PWD}') {
|
|
336
335
|
specmem.env.SPECMEM_PROJECT_PATH = projectPath;
|
|
337
336
|
}
|
|
338
337
|
logger.info({ projectPath, oldArgs: args, newArgs: updatedArgs }, '[ConfigInjector] Fixed outdated specmem path in project config');
|
|
@@ -349,9 +348,9 @@ function fixProjectMcpConfigs() {
|
|
|
349
348
|
args: ['--max-old-space-size=250', BOOTSTRAP_PATH],
|
|
350
349
|
env: {
|
|
351
350
|
HOME: HOME_DIR,
|
|
352
|
-
SPECMEM_PROJECT_PATH: '${
|
|
353
|
-
SPECMEM_WATCHER_ROOT_PATH: '${
|
|
354
|
-
SPECMEM_CODEBASE_PATH: '${
|
|
351
|
+
SPECMEM_PROJECT_PATH: '${PWD}',
|
|
352
|
+
SPECMEM_WATCHER_ROOT_PATH: '${PWD}',
|
|
353
|
+
SPECMEM_CODEBASE_PATH: '${PWD}',
|
|
355
354
|
SPECMEM_DB_HOST: process.env.SPECMEM_DB_HOST || 'localhost',
|
|
356
355
|
SPECMEM_DB_PORT: process.env.SPECMEM_DB_PORT || '5432',
|
|
357
356
|
SPECMEM_SESSION_WATCHER_ENABLED: 'true',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specmem-hardwicksoftware",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Persistent memory system for coding sessions - semantic search with pgvector, token compression, team coordination, file watching. Needs root: installs system-wide hooks, manages docker/PostgreSQL, writes global configs, handles screen sessions. justcalljon.pro",
|
|
6
6
|
"main": "dist/index.js",
|